From edfdb4a443ab89d8d0dcb0952aab96423b4544fc Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Tue, 23 May 2017 23:26:25 +0200 Subject: Added database migration script. --- src/web/controllers/bookmark.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/web/controllers/bookmark.py') 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) -- cgit