Jul 30 - Allow customer to flag follow-up a inspection
This commit is contained in:
+6
-1
@@ -34,7 +34,12 @@ class User(UserMixin, db.Model):
|
||||
set_password_token_expires = db.Column(db.DateTime, nullable=True)
|
||||
|
||||
# Relationships
|
||||
inspections = db.relationship('Inspection', backref='inspector', lazy='dynamic')
|
||||
# Explicit foreign_keys: inspections now has a SECOND FK to users
|
||||
# (follow_up_requested_by, phase46), so the join is otherwise ambiguous.
|
||||
# This relationship means "inspections I performed" — inspector_id only.
|
||||
inspections = db.relationship('Inspection', backref='inspector',
|
||||
lazy='dynamic',
|
||||
foreign_keys='Inspection.inspector_id')
|
||||
|
||||
# ── Flask-Login integration ────────────────────────────────────────────
|
||||
# Override UserMixin.is_active so that disabled accounts are rejected
|
||||
|
||||
Reference in New Issue
Block a user