core models not imported properly
It is not enough to use core models as string parameters in other models property declarations (e.g. db.relationship
), it needs to be explicitly imported and used as is in property declarations.
index 8b2ff37..39f2585 100644
--- a/app/users/models.py
+++ b/app/users/models.py
@@ -5,6 +5,7 @@ from itsdangerous import BadSignature, SignatureExpired
from flask import current_app, url_for
from app import db
+from app.core.models import Party
from app.core.utils import flatten
from app.exceptions import ValidationError
Stage this hunk [y,n,q,a,d,j,J,g,/,e,?]? y
@@ -199,7 +200,7 @@ class User(db.Model):
# relationships
owner = db.relationship(
- "Party", backref=db.backref('user_account', uselist=False))
+ Party, backref=db.backref('user_account', uselist=False))
# associations
user_privileges = association_proxy('users_privileges', 'privilege')