Skip to content

Commit

Permalink
Update profiles.py
Browse files Browse the repository at this point in the history
  • Loading branch information
adityabaravkar authored Sep 4, 2023
1 parent 5d407cf commit 9400383
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ def put(self):
print('in Owner Profile')
response = {}
payload = request.get_json()
if payload.get('owner_uid') is None:
raise BadRequest("Request failed, no UID in payload.")
key = {'owner_uid': payload.pop('owner_uid')}
with connect() as db:
response = db.update('ownerProfileInfo', key, payload)
Expand Down

0 comments on commit 9400383

Please sign in to comment.