Compare commits

...

3 Commits

Author SHA1 Message Date
db0 45c4f9cf79 fix: tag delete 2023-10-03 10:46:51 +02:00
db0 898500c5a0 fix: tag delete 2023-10-03 10:30:23 +02:00
db0 687e8599fd fix: tag delete 2023-10-03 10:22:09 +02:00
5 changed files with 11 additions and 6 deletions

View File

@ -1,5 +1,9 @@
# Changelog
# 0.19.1
* Fixed Deleting tags
# 0.19.0
* Added instance Tags. Instance owners can add and remove them

View File

@ -64,7 +64,7 @@ class Tags(Resource):
def delete(self):
'''Delete an instance's tag
'''
self.args = self.patch_parser.parse_args()
self.args = self.delete_parser.parse_args()
if not self.args.apikey:
raise e.Unauthorized("You must provide the API key that was PM'd to the admin account")
user = database.find_user_by_api_key(self.args.apikey)
@ -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

View File

@ -1,4 +1,4 @@
FEDISEER_VERSION = "0.19.0"
FEDISEER_VERSION = "0.19.1"
SUPPORTED_SOFTWARE = {
"lemmy",
"mastodon",

View File

@ -486,7 +486,7 @@ def instance_has_flag(instance_id, flag_enum):
def get_instance_tag(instance_id, tag: str):
query = InstanceTag.query.filter(
InstanceTag.instance_id == instance_id,
InstanceTag.flag == tag,
InstanceTag.tag == tag,
)
return query.first()

View File

@ -33,5 +33,6 @@ However using the endorsement system, you can create a further customized whitel
These are the people who made this software possible.
* [Db0](https://dbzer0.com) - Development and Maintenance.
* [Rikudou](https://lemmings.world/u/rikudou) - GUI Development.
<a rel="me" href="https://botsin.space/@fediseer"></a>