Procházet zdrojové kódy

don't insert empty tags

Daniel Sheffield před 2 roky
rodič
revize
5d55cd7c9c
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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 = \