reorganisation du test export description

This commit is contained in:
SebF 2022-01-13 22:15:44 +01:00
parent 6ae2729652
commit 7612eb0b7f
1 changed files with 15 additions and 8 deletions

View File

@ -124,15 +124,22 @@ class Utils:
# filtrage des tags
description = ""
for tag in overpass_query_fields.keys():
if overpass_query_fields[tag]["export_json"] == "Oui":
if tag in element["tags"]:
if overpass_query_fields[tag]["FR"] != "":
description = (
description + overpass_query_fields[tag]["FR"] + " : "
)
if (
overpass_query_fields[tag]["export_json"] == "Oui"
and tag in element["tags"]
and overpass_query_fields[tag]["FR"] != ""
):
description = (
description
+ overpass_query_fields[tag]["FR"]
+ " : "
+ str(element["tags"][tag])
+ "\n"
)
description = description + str(element["tags"][tag]) + "\n"
export_json["elements"][index_line]["tags"] = {"description": description}
export_json["elements"][index_line]["tags"] = {
"description": description[:-1]
}
index_line = index_line + 1