From 9400383dc791d59ad5300e70dfbef1b410221122 Mon Sep 17 00:00:00 2001 From: Aditya Baravkar Date: Mon, 4 Sep 2023 15:07:32 -0700 Subject: [PATCH] Update profiles.py --- profiles.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/profiles.py b/profiles.py index 4cef576..5e4dc8a 100644 --- a/profiles.py +++ b/profiles.py @@ -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)