Skip to content

Commit 1ee2ef0

Browse files
committed
fix problem in adoption person id api
1 parent 65c00a8 commit 1ee2ef0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/server/api/common_api.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ def get_360(matching_id):
7878

7979
result['shifts'] = volgisticsshifts_results
8080

81-
8281
if row["source_type"] == "shelterluvpeople":
8382
adoptions = []
8483
person = requests.get("http://shelterluv.com/api/v1/people/{}".format(row["source_id"]),
@@ -95,5 +94,8 @@ def get_360(matching_id):
9594
adoptions.append(animal_details_json)
9695

9796
result['adoptions'] = adoptions
98-
result['adoptions_person_id'] = person_json["ID"]
97+
98+
if "ID" in person_json:
99+
result['adoptions_person_id'] = person_json["ID"]
100+
99101
return jsonify({'result': result})

0 commit comments

Comments
 (0)