mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-10 08:38:28 +00:00
fix: [Paste submit] fix tags unpack
This commit is contained in:
parent
9898766ed7
commit
2cf419fc26
2 changed files with 7 additions and 7 deletions
|
@ -159,7 +159,10 @@ def get_item_tags_minimal(item_id):
|
|||
|
||||
def unpack_str_tags_list(str_tags_list):
|
||||
str_tags_list = str_tags_list.replace('"','\"')
|
||||
if str_tags_list:
|
||||
return str_tags_list.split(',')
|
||||
else:
|
||||
return []
|
||||
|
||||
|
||||
# TEMPLATE + API QUERY
|
||||
|
|
|
@ -258,13 +258,10 @@ def submit():
|
|||
|
||||
if ltags or ltagsgalaxies:
|
||||
|
||||
ltags = ltags.split(',')
|
||||
ltagsgalaxies = ltagsgalaxies.split(',')
|
||||
ltags = Tag.unpack_str_tags_list(ltags)
|
||||
ltagsgalaxies = Tag.unpack_str_tags_list(ltagsgalaxies)
|
||||
|
||||
print(ltags)
|
||||
print(ltagsgalaxies)
|
||||
|
||||
if not Tags.is_valid_tags_taxonomies_galaxy(ltags, ltagsgalaxies):
|
||||
if not Tag.is_valid_tags_taxonomies_galaxy(ltags, ltagsgalaxies):
|
||||
content = 'INVALID TAGS'
|
||||
print(content)
|
||||
return content, 400
|
||||
|
|
Loading…
Reference in a new issue