diff options
Diffstat (limited to 'newspipe/models/user.py')
-rw-r--r-- | newspipe/models/user.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/newspipe/models/user.py b/newspipe/models/user.py index d051b9a2..b17496a2 100644 --- a/newspipe/models/user.py +++ b/newspipe/models/user.py @@ -36,6 +36,7 @@ from werkzeug.security import check_password_hash from newspipe.bootstrap import db from newspipe.models.category import Category from newspipe.models.feed import Feed +from newspipe.models.bookmark import Bookmark from newspipe.models.right_mixin import RightMixin @@ -76,6 +77,12 @@ class User(db.Model, UserMixin, RightMixin): cascade="all, delete-orphan", foreign_keys=[Feed.user_id], ) + bookmarks = db.relationship( + "Bookmark", + backref="user", + cascade="all, delete-orphan", + foreign_keys=[Bookmark.user_id], + ) @staticmethod def _fields_base_write(): |