Skip to content

Commit

Permalink
Updates lines 1406-1407
Browse files Browse the repository at this point in the history
  • Loading branch information
ertush committed Aug 2, 2024
1 parent 051bff0 commit 0787d18
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion facilities/models/facility_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def get_parent_id(self, ward_id):
return dhis2_facility[0]["id"]

def push_facility_to_dhis2(self, new_facility_payload, new_facility):

if new_facility:
r = requests.post(
settings.DHIS_ENDPOINT+"api/organisationUnits",
Expand Down Expand Up @@ -1378,6 +1378,7 @@ def push_new_facility(self, code=None):
facility_code = str(code)
else:
facility_code = str(self.code)

new_facility_payload = {
"id": dhis2_org_unit_id[0],
"code": facility_code,
Expand All @@ -1392,6 +1393,7 @@ def push_new_facility(self, code=None):
re.search(r'\((.*?)\)', str(FacilityCoordinates.objects.values('coordinates')
.get(facility_id=self.id)['coordinates'])).group(1))
}

metadata_payload = {
"facility_type": kmhfl_dhis2_facility_type_mapping[str(self.facility_type_id)],
"keph": kmhfl_dhis2_keph_mapping[str(self.keph_level_id)],
Expand Down

0 comments on commit 0787d18

Please sign in to comment.