Skip to content

Commit 422e087

Browse files
authored
Merge pull request #7 from CIAT-DAPA/develop
added aclimate id in the response of the single waterpont
2 parents 804a21e + 105c12e commit 422e087

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/api_modules/sigle_waterpoint.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,6 @@ def get(self,waterpoint=None):
5252
else:
5353
print(waterpoint)
5454
q_set = Waterpoint.objects(id = waterpoint)
55-
json_data = [{"id":str(x.id),"name":x.name,"lat":x.lat,"lon":x.lon,"area":x.area,"ext_id":str(x.ext_id),"climatology":x.climatology,"watershed":str(x.watershed.id)} for x in q_set]
55+
json_data = [{"id":str(x.id),"name":x.name,"lat":x.lat,"lon":x.lon,"area":x.area,"ext_id":str(x.ext_id),"climatology":x.climatology,"watershed":str(x.watershed.id),"aclimate_id":x.aclimate_id} for x in q_set]
5656

5757
return json_data

src/api_modules/single_waterpoint_profile.py

+1
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ def get(self, waterpoint=None):
113113
"lat": waterpoint.lat,
114114
"lon": waterpoint.lon,
115115
"area": waterpoint.area,
116+
"aclimate_id":waterpoint.aclimate_id,
116117
"ext_id": str(waterpoint.ext_id),
117118
"watershed": watershed_id,
118119
"watershed_name": watershed_name,

src/api_modules/warterpoint_profile.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ def get(self):
103103
"lat": waterpoint.lat,
104104
"lon": waterpoint.lon,
105105
"area": waterpoint.area,
106+
"aclimate_id":waterpoint.aclimate_id,
106107
"ext_id": str(waterpoint.ext_id),
107108
"watershed": watershed_id,
108109
"watershed_name": watershed_name,
@@ -111,7 +112,7 @@ def get(self):
111112
"adm1": adm1.name,
112113
"contents_wp": contents_list,
113114
"contents_ws": contents_list_ws,
114-
115+
115116
}
116117

117118
json_data.append(waterpoint_data)

0 commit comments

Comments
 (0)