diff --git a/src/backend/app/central/central_crud.py b/src/backend/app/central/central_crud.py index b6d95e01c..9ed881870 100644 --- a/src/backend/app/central/central_crud.py +++ b/src/backend/app/central/central_crud.py @@ -796,12 +796,11 @@ async def get_entities_data( # Rename '__id' to 'id' flattened_dict["id"] = flattened_dict.pop("__id") - # convert empty str task_id and osm_id to None - # when new entities are created task_id and osm_id will be empty - if "task_id" in flattened_dict and flattened_dict["task_id"] == "": - flattened_dict["task_id"] = None + # convert empty str osm_id to None + # when new entities are created osm_id will be empty if "osm_id" in flattened_dict and flattened_dict["osm_id"] == "": flattened_dict["osm_id"] = None + all_entities.append(flattened_dict) return all_entities diff --git a/src/backend/app/central/central_schemas.py b/src/backend/app/central/central_schemas.py index 2392801c1..2f62e1c5f 100644 --- a/src/backend/app/central/central_schemas.py +++ b/src/backend/app/central/central_schemas.py @@ -102,7 +102,7 @@ class EntityTaskID(BaseModel): """Map of Entity UUID to FMTM Task ID.""" id: str - task_id: Optional[int] = None + task_id: int class EntityMappingStatus(EntityOsmID, EntityTaskID):