Skip to content

Commit 3ab8656

Browse files
committed
remove underscore when no lang is present in gbfs endpoint ids
1 parent 7bd93c4 commit 3ab8656

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

functions-python/gbfs_validator/src/gbfs_data_processor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,9 @@ def update_or_create_gbfs_endpoint(
284284
features: List[str],
285285
) -> Gbfsendpoint:
286286
"""Update or create a GBFS endpoint entity."""
287-
formatted_id = (
288-
f"{self.stable_id}_{version}_{endpoint.name}_{endpoint.language or ''}"
289-
)
287+
formatted_id = f"{self.stable_id}_{version}_{endpoint.name}"
288+
if endpoint.language:
289+
formatted_id += f"_{endpoint.language}"
290290
gbfs_endpoint_orm = (
291291
db_session.query(Gbfsendpoint)
292292
.filter(Gbfsendpoint.id == formatted_id)

0 commit comments

Comments
 (0)