diff options
| author | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-08-13 23:17:50 +0300 |
|---|---|---|
| committer | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-08-13 23:17:50 +0300 |
| commit | 3d086d18a2639a76c4739b6ca7ca06416356c706 (patch) | |
| tree | 5c9e122ae7e84b8013e8a742714a5779f871f6ad /opendc/models/machine_state.py | |
| parent | f589682b0840aab0624122052eb863cf8dc3a0b9 (diff) | |
| parent | bc70e6ae115beb469541c12014ffdecc01a1e50c (diff) | |
Merge branch 'master' into flat-api
Diffstat (limited to 'opendc/models/machine_state.py')
| -rw-r--r-- | opendc/models/machine_state.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/opendc/models/machine_state.py b/opendc/models/machine_state.py index 44bc6746..693b57d2 100644 --- a/opendc/models/machine_state.py +++ b/opendc/models/machine_state.py @@ -38,7 +38,7 @@ class MachineState(Model): machine_states = [] - statement = 'SELECT * FROM machine_states WHERE experiment_id = ?' + statement = 'SELECT * FROM machine_states WHERE experiment_id = %s' results = database.fetchall(statement, (experiment_id,)) for row in results: @@ -52,7 +52,7 @@ class MachineState(Model): machine_states = [] - statement = 'SELECT * FROM machine_states WHERE experiment_id = ? AND machine_states.tick = ?' + statement = 'SELECT * FROM machine_states WHERE experiment_id = %s AND machine_states.tick = %s' results = database.fetchall(statement, (experiment_id, tick)) for row in results: @@ -65,7 +65,7 @@ class MachineState(Model): super(MachineState, self).read() - statement = 'SELECT tick FROM task_states WHERE id = ?' + statement = 'SELECT tick FROM task_states WHERE id = %s' result = database.fetchone(statement, (self.task_state_id,)) self.tick = result[0] |
