[snowy] Clear a note's tags before applying those specified in a PUT.
- From: Sanford Armstrong <sharm src gnome org>
- To: svn-commits-list gnome org
- Subject: [snowy] Clear a note's tags before applying those specified in a PUT.
- Date: Mon, 18 May 2009 19:35:34 -0400 (EDT)
commit 391999faebf33ae03b8c0745746722de16aca262
Author: Sandy Armstrong <sanfordarmstrong gmail com>
Date: Mon May 18 16:21:57 2009 -0700
Clear a note's tags before applying those specified in a PUT.
---
api/handlers.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/api/handlers.py b/api/handlers.py
index 7babd3a..aacdde3 100644
--- a/api/handlers.py
+++ b/api/handlers.py
@@ -136,6 +136,7 @@ class NotesHandler(BaseHandler):
if c.has_key('create-date'): note.created = clean_date(c['create-date'])
if c.has_key('open-on-startup'): note.open_on_startup = (c['open-on-startup'] == True)
if c.has_key('tags'):
+ note.tags.clear()
for tagName in c['tags']:
is_notebook = tagName.startswith('system:notebook:')
tag, created = NoteTag.objects.get_or_create(author=user,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]