fix: [ui tag selector] force custom tags

This commit is contained in:
Terrtia 2022-05-19 13:57:07 +02:00
parent a3e576ed49
commit df4bb531d2
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0
2 changed files with 8 additions and 5 deletions

View file

@ -1028,8 +1028,9 @@ def api_create_sync_queue(json_dict):
tags = json_dict.get('tags')
if not tags:
return {"status": "error", "reason": "no tags provided"}, 400
if not Tag.are_enabled_tags(tags):
return {"status": "error", "reason": "Invalid/Disabled tags"}, 400
# FIXME: add custom tags
# if not Tag.are_enabled_tags(tags):
# return {"status": "error", "reason": "Invalid/Disabled tags"}, 400
max_size = json_dict.get('max_size')
if not max_size:
@ -1064,8 +1065,9 @@ def api_edit_sync_queue(json_dict):
tags = json_dict.get('tags')
if tags:
if not Tag.are_enabled_tags(tags):
return {"status": "error", "reason": "Invalid/Disabled tags"}, 400
# FIXME: add custom tags
# if not Tag.are_enabled_tags(tags):
# return {"status": "error", "reason": "Invalid/Disabled tags"}, 400
edit_sync_queue_filter_tags(queue_uuid, tags)
max_size = json_dict.get('max_size')

View file

@ -35,6 +35,7 @@
</div>
<!--
<button class="btn btn-primary" onclick="tagsSelector()">
<i class="fas fa-plus"></i>
@ -47,7 +48,7 @@
var ltags;
var ltagsgalaxies;
$.getJSON("{{ url_for('tags_ui.tag_taxonomies_tags_enabled_json') }}",
$.getJSON("{{ url_for('Tags.get_all_tags') }}",
function(data) {
{% if 'taxonomies_tags' in tags_selector_data %}
var valueData = [