Now only add unique keywords, either they are selected or write down.
authorfabien@tzone.org
Wed, 31 Dec 2008 01:53:22 -0500
changeset 73 c078d8a04d76
parent 72 34fcc8b2c1f5
child 74 6784c4350b41
Now only add unique keywords, either they are selected or write down.
lib/actions.py
lib/actions/add.py
--- a/lib/actions.py	Wed Dec 31 01:40:46 2008 -0500
+++ b/lib/actions.py	Wed Dec 31 01:53:22 2008 -0500
@@ -29,5 +29,6 @@
 actions['edit'] = ('edit', 'do_it')
 actions['import'] = ('imp_xbel', 'do_it')
 actions['add'] = ('add', 'do_it')
+actions['bookmark'] = ('add', 'do_it')
 actions['keywords'] = ('editkw', 'do_it')
 actions['prefs'] = ('edit_prefs', 'do_it')
--- a/lib/actions/add.py	Wed Dec 31 01:40:46 2008 -0500
+++ b/lib/actions/add.py	Wed Dec 31 01:53:22 2008 -0500
@@ -2,6 +2,7 @@
 from bkmark import Bookmark
 from webutils import load_index
 from templates import Template
+from keywords import add_unique_keywords
 import os
 
 def get_bk_from_form(form):
@@ -35,7 +36,7 @@
 def get_unique_keywords(form, db):
       kw = get_kw_from_form(form)
       kw = set(map(db.get_keyword, kw))
-      return list(kw.union(get_new_kw_from_form(form))
+      return list(kw.union(get_new_kw_from_form(form)))
 
 def edit(db, prefs, form, id):
     name = url = ""