Skip to content

Commit b8babc1

Browse files
authored
Merge pull request #1651 from bryanbrattlof/sync-places-fix
contrib/sync-places: filter tags during creation
2 parents c3a2b67 + b8dd4c9 commit b8babc1

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

contrib/sync-places.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,7 @@ async def do_sync(session, args):
117117
await session.sync_with_coordinator()
118118
changed = True
119119

120-
tags = config["places"][name].get("tags", {}).copy()
121-
for k, v in tags.items():
122-
if not isinstance(k, str) or not isinstance(v, str):
123-
del(tags[k])
124-
tags[str(k)] = str(v)
120+
tags = { str(k): str(v) for k, v in config["places"][name].get("tags", {}).items() }
125121

126122
if place_tags != tags:
127123
print(

0 commit comments

Comments
 (0)