home · contact · privacy
Remove more redundant code.
[plomtask] / plomtask / conditions.py
index b2ecda14cb7cef0b5bf350d1a253389ea32aabb7..8d67e5a78c85b1672aaaaac133ab0422e80a6d73 100644 (file)
@@ -30,20 +30,6 @@ class Condition(BaseModel[int]):
                 getattr(condition, name).history_from_row(row_)
         return condition
 
-    @classmethod
-    def all(cls, db_conn: DatabaseConnection) -> list[Condition]:
-        """Collect all Conditions and their VersionedAttributes."""
-        conditions = {}
-        for id_, condition in cls.cache_.items():
-            conditions[id_] = condition
-        already_recorded = conditions.keys()
-        for id_ in db_conn.column_all('conditions', 'id'):
-            if id_ not in already_recorded:
-                condition = cls.by_id(db_conn, id_)
-                assert isinstance(condition.id_, int)
-                conditions[condition.id_] = condition
-        return list(conditions.values())
-
     @classmethod
     def by_id(cls, db_conn: DatabaseConnection, id_: int | None,
               create: bool = False) -> Condition: