diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2017-05-23 23:26:25 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2017-05-23 23:26:25 +0200 |
commit | edfdb4a443ab89d8d0dcb0952aab96423b4544fc (patch) | |
tree | 9fb5c6e220cb5bc880a83762ef19f762ec6dc60b /src/web/controllers | |
parent | removed a comment (diff) | |
download | newspipe-edfdb4a443ab89d8d0dcb0952aab96423b4544fc.tar.gz newspipe-edfdb4a443ab89d8d0dcb0952aab96423b4544fc.tar.bz2 newspipe-edfdb4a443ab89d8d0dcb0952aab96423b4544fc.zip |
Added database migration script.
Diffstat (limited to 'src/web/controllers')
-rw-r--r-- | src/web/controllers/bookmark.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/web/controllers/bookmark.py b/src/web/controllers/bookmark.py index c8423414..b5413243 100644 --- a/src/web/controllers/bookmark.py +++ b/src/web/controllers/bookmark.py @@ -22,8 +22,11 @@ class BookmarkController(AbstractController): .delete() for tag in attrs['tags']: - BookmarkTagController(self.user_id) \ - .update({'id': tag.id}, {'bookmark_id': filters["id"]}) + BookmarkTagController(self.user_id).create( + **{'text': tag.text, + 'id': tag.id, + 'bookmark_id': tag.bookmark_id, + 'user_id': tag.user_id}) del attrs['tags'] return super().update(filters, attrs) |