Feb 27 2026: add inspection delete button
This commit is contained in:
@@ -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}>'
|
||||
Reference in New Issue
Block a user