fixed keyword names including labels during import

This commit is contained in:
vabene1111 2022-02-22 21:21:25 +01:00
parent 5424702dff
commit b9597a3333

View File

@ -334,7 +334,7 @@ def parse_keywords(keyword_json, space):
kw = normalize_string(kw)
if len(kw) != 0:
if k := Keyword.objects.filter(name=kw, space=space).first():
keywords.append({'id': str(k.id), 'text': str(k)})
keywords.append({'id': str(k.id), 'text': str(k.name)})
else:
keywords.append({'id': random.randrange(1111111, 9999999, 1), 'text': kw})