If you create a tag with the same name as an existing tag it will update it rather then creating a new instance, still needs further work to improve UX

This commit is contained in:
Peter Stockings
2023-07-13 22:04:03 +10:00
parent 8802d37124
commit 1970bc6417
2 changed files with 25 additions and 9 deletions

4
app.py
View File

@@ -347,9 +347,9 @@ def add_tag():
tag = request.args.get('tag')
tag_filter = request.args.get('filter')
if person_id:
db.add_tag_for_person(person_id, tag, tag_filter)
db.add_or_update_tag_for_person(person_id, tag, tag_filter)
else:
db.add_tag_for_dashboard(tag, tag_filter)
db.add_or_update_tag_for_dashboard(tag, tag_filter)
return ""