Skip to content

Commit

Permalink
fixed data seeding issue (#2221)
Browse files Browse the repository at this point in the history
Co-authored-by: Vignesh Hari <vichuhari100@gmail.com>
  • Loading branch information
DraKen0009 and vigneshhari authored Jun 3, 2024
1 parent 7b90428 commit a9f8d3d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions care/facility/management/commands/load_dummy_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ def handle(self, *args, **options):
self.BASE_URL + "users.json",
self.BASE_URL + "facility.json",
)
management.call_command("populate_investigations")
except Exception as e:
raise CommandError(e)
3 changes: 2 additions & 1 deletion care/facility/models/patient_investigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ class PatientInvestigation(BaseModel):
choices = models.TextField(null=True, blank=True)

def __str__(self) -> str:
return self.name + " in " + self.unit + " as " + self.investigation_type
unit_part = f" in {self.unit}" if self.unit else ""
return f"{self.name}{unit_part} as {self.investigation_type}"


class InvestigationSession(BaseModel):
Expand Down

0 comments on commit a9f8d3d

Please sign in to comment.