ValidateNotAllZero = SimpleFormValidator(validate_state)
+def prune_tags():
+ for tag in meta.Session.query(model.Tag).all():
+ if not tag.expenditures:
+ meta.Session.delete(tag)
+ meta.Session.commit()
+
class ExpenditureSchema(Schema):
"Validate an expenditure."
allow_extra_fields = False
'op': op})
g.handle_notification(involved_users, show, body)
+ prune_tags()
+
return h.redirect_to('/')
def delete(self, id):
'op': 'deleted'})
g.handle_notification(involved_users, show, body)
+ prune_tags()
+
return h.redirect_to('/')