Feb 27 2026: add inspection delete button

This commit is contained in:
2026-02-27 12:31:53 -05:00
parent 64445eb793
commit e31027f770
3 changed files with 112 additions and 5 deletions
+2 -2
View File
@@ -65,7 +65,7 @@ class Inspection(db.Model):
completed_at = db.Column(db.DateTime)
results = db.relationship('InspectionResult', backref='inspection', lazy='dynamic', cascade='all, delete-orphan')
issues = db.relationship('Issue', backref='inspection', lazy='dynamic')
issues = db.relationship('Issue', backref='inspection', lazy='dynamic', cascade='all, delete-orphan')
def __repr__(self):
return f'<Inspection {self.id} - {self.inspection_date}>'
@@ -83,4 +83,4 @@ class InspectionResult(db.Model):
photo_path = db.Column(db.String(255))
def __repr__(self):
return f'<InspectionResult {self.id}>'
return f'<InspectionResult {self.id}>'