diff options
| author | Georgios Andreadis <G.Andreadis@student.tudelft.nl> | 2017-08-10 09:40:26 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-10 09:40:26 +0300 |
| commit | bc70e6ae115beb469541c12014ffdecc01a1e50c (patch) | |
| tree | 935c2ef5b1621b0e13ec76f2ca02f6912940d690 /opendc/models/machine_state.py | |
| parent | 5d42f30ed30aa5b6970304569c6bd01c16078759 (diff) | |
| parent | 54617bf3268c27d63a40844216760a49f28d39e0 (diff) | |
Merge pull request #9 from atlarge-research/mariadb
Migration to MariaDB
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] |
