Skip to content

Commit 233e348

Browse files
committed
fix app_id update
1 parent 59ac9d5 commit 233e348

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

model_validation_api/views.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1209,7 +1209,9 @@ def put(self, request, format=None):
12091209
## save only modifications on model. if you want to modify images or instances, do separate put.
12101210
##get objects
12111211
value = request.data['models'][0]
1212+
12121213
app_id = request.GET.getlist('app_id')
1214+
12131215
if len(app_id) > 0 :
12141216
value['app_id'] = app_id[0]
12151217

@@ -1230,7 +1232,7 @@ def put(self, request, format=None):
12301232
return HttpResponse('Unauthorized', status=401)
12311233
return HttpResponseForbidden()
12321234

1233-
app_id = value['app_id']
1235+
app_id = value['app']['id']
12341236

12351237
collab_id = get_collab_id_from_app_id(app_id)
12361238
if not is_authorised(request, collab_id):

0 commit comments

Comments
 (0)