Browse Source

Adds fetchone to turn retrieval query

Jose Reyes 5 years ago
parent
commit
2b14abd89b
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      __init__.py

+ 1
- 1
__init__.py View File

45
                 turn = db.execute(
45
                 turn = db.execute(
46
                     'SELECT last_turn FROM station WHERE s_id=?',
46
                     'SELECT last_turn FROM station WHERE s_id=?',
47
                     (station_id,)
47
                     (station_id,)
48
-                )
48
+                ).fetchone()
49
                 db.execute(
49
                 db.execute(
50
                     'INSERT INTO turno (cName, cEmail, turn, timeArrival, station)'
50
                     'INSERT INTO turno (cName, cEmail, turn, timeArrival, station)'
51
                     ' VALUES (?, ?, ?, ?)',
51
                     ' VALUES (?, ?, ?, ?)',