Make tag parsing more robust
This commit is contained in:
parent
7791e96809
commit
733ca0eef3
|
@ -48,7 +48,7 @@ def create_tags(query):
|
||||||
spl = query.split("AND")
|
spl = query.split("AND")
|
||||||
spl = [x.strip() for x in spl if ":" in x]
|
spl = [x.strip() for x in spl if ":" in x]
|
||||||
spl = [x.replace('"', "") for x in spl]
|
spl = [x.replace('"', "") for x in spl]
|
||||||
tags = [f"{tag}: {elem}" for tag, elem in [x.split(":") for x in spl]]
|
tags = [f"{tag}: {elem}" for tag, elem in [x.split(":")[:2] for x in spl]]
|
||||||
return tags
|
return tags
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue