X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=plomtask%2Fconditions.py;h=45aa62b9b27a026c75549aea3350640c419d8a5e;hb=704c00a101fc1922158a3a71a043562d34b696ad;hp=337970924ab25305d64abef13afe24148b0209b1;hpb=23012cd370777b60a25839788d131173d2abee91;p=plomtask diff --git a/plomtask/conditions.py b/plomtask/conditions.py index 3379709..45aa62b 100644 --- a/plomtask/conditions.py +++ b/plomtask/conditions.py @@ -44,6 +44,8 @@ class Condition(BaseModel[int]): table_name = f'{item}_{attr}' for _ in db_conn.row_where(table_name, 'condition', self.id_): raise HandledException('cannot remove Condition in use') + db_conn.delete_where('condition_titles', 'parent', self.id_) + db_conn.delete_where('condition_descriptions', 'parent', self.id_) super().remove(db_conn)