Parcourir la source

don't insert empty tags

Daniel Sheffield il y a 2 ans
Parent
commit
5d55cd7c9c
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      grocery_transactions.py

+ 1 - 1
grocery_transactions.py

@@ -93,7 +93,7 @@ class GroceryTransactionEditor(WidgetPlaceholder):
         product = data['product']
         organic = 'true' if data['organic'] is True else 'false'
         tags = ', '.join([
-            f'$quot${v}$quot$' for t,v in data.items() if 'tags' in t
+            f'$quot${v}$quot$' for t,v in data.items() if 'tags' in t and v
         ])
         tags = f", ARRAY[{tags}]" if tags else ''
         statement = \