aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/web/models/user.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/web/models/user.py b/src/web/models/user.py
index 96556b98..08279c7e 100644
--- a/src/web/models/user.py
+++ b/src/web/models/user.py
@@ -47,8 +47,6 @@ class User(db.Model, UserMixin, RightMixin):
pwdhash = db.Column(db.String())
date_created = db.Column(db.DateTime(), default=datetime.now)
last_seen = db.Column(db.DateTime(), default=datetime.now)
- feeds = db.relationship('Feed', backref='subscriber', lazy='dynamic',
- cascade='all,delete-orphan')
refresh_rate = db.Column(db.Integer, default=60) # in minutes
# user rights
@@ -56,6 +54,11 @@ class User(db.Model, UserMixin, RightMixin):
is_admin = db.Column(db.Boolean(), default=False)
is_api = db.Column(db.Boolean(), default=False)
+ # relationship
+ feeds = db.relationship('Feed', backref='subscriber', lazy='dynamic',
+ cascade='all,delete-orphan')
+ categories = db.relationship('Category', cascade='all, delete-orphan')
+
@staticmethod
def _fields_base_write():
return {'login', 'password', 'email'}
bgstack15