Skip to content

Commit

Permalink
fix id type in in-memory
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed Oct 5, 2023
1 parent 99b9f02 commit 9837639
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion care/facility/static_data/icd11.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ def fetch_from_db():
# This is a hack to prevent the migration from failing when the table does not exist
all_tables = connection.introspection.table_names()
if "facility_icd11diagnosis" in all_tables:
return ICD11Diagnosis.objects.all().values("id", "label")
return [
{
"id": str(diagnosis["id"]),
"label": diagnosis["label"],
}
for diagnosis in ICD11Diagnosis.objects.all().values("id", "label")
]
return []


Expand Down

0 comments on commit 9837639

Please sign in to comment.