Skip to content

Commit f283126

Browse files
committed
query osm editor instead of source
1 parent 080baf8 commit f283126

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

mapswipe_workers/mapswipe_workers/utils/api_calls.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def remove_noise_and_add_user_info(json: dict) -> dict:
5252
"@lastEdit": 0,
5353
"@osmId": 0,
5454
"@version": 0,
55-
"source": 0,
55+
"created_by": 0,
5656
"hashtags": 0,
5757
}
5858

@@ -80,6 +80,13 @@ def remove_noise_and_add_user_info(json: dict) -> dict:
8080
except KeyError:
8181
missing_rows["hashtags"] += 1
8282

83+
try:
84+
new_properties["created_by"] = changeset_results[changeset_id]["tags"][
85+
"created_by"
86+
]
87+
except KeyError:
88+
missing_rows["created_by"] += 1
89+
8390
feature["properties"] = new_properties
8491
logger.info("finished filtering and adding extra info")
8592
if any(x > 0 for x in missing_rows.values()):

0 commit comments

Comments
 (0)