fix: tag delete

pull/47/head
db0 2023-10-03 10:46:51 +02:00
parent 898500c5a0
commit 45c4f9cf79
1 changed files with 3 additions and 3 deletions

View File

@ -75,9 +75,9 @@ class Tags(Resource):
tags = [t.strip() for t in self.args.tags_csv.split(',')]
for tag in tags:
existing_tag = database.get_instance_tag(instance.id,tag)
if not existing_tag:
existing_tag
db.session.delete(existing_tag)
if existing_tag:
db.session.delete(existing_tag)
changed = True
if changed:
db.session.commit()
return {"message": "Changed"},200