home · contact · privacy
Improve consistency of DB column names.
[plomtask] / plomtask / conditions.py
index 80fc13e4f0a68a9784cc1ec510311f76c0e44320..98a0b99e667adfe11f9f4f0ef3439df03a6cc67f 100644 (file)
@@ -26,11 +26,11 @@ class Condition(BaseModel):
         condition = super().from_table_row(db_conn, row)
         assert isinstance(condition, Condition)
         for title_row in db_conn.exec('SELECT * FROM condition_titles '
-                                      'WHERE parent_id = ?', (row[0],)):
+                                      'WHERE parent = ?', (row[0],)):
             condition.title.history[title_row[1]]\
                     = title_row[2]  # pylint: disable=no-member
         for desc_row in db_conn.exec('SELECT * FROM condition_descriptions '
-                                     'WHERE parent_id = ?', (row[0],)):
+                                     'WHERE parent = ?', (row[0],)):
             condition.description.history[desc_row[1]]\
                     = desc_row[2]  # pylint: disable=no-member
         return condition