FIX: check invalid
This commit is contained in:
parent
f88afa5444
commit
d156c1d937
@ -675,7 +675,10 @@ class AccuracyViewSet(viewsets.ViewSet):
|
||||
|
||||
subscription_request_files = SubscriptionRequestFile.objects.filter(request=subscription_request.id)
|
||||
|
||||
reviewed_result = json.loads(data["reviewed_result"])
|
||||
if not data["reviewed_result"]:
|
||||
raise InvalidException(excArgs=f'reviewed_result')
|
||||
|
||||
reviewed_result = data["reviewed_result"]
|
||||
for field in ['retailername', 'sold_to_party', 'purchase_date', 'imei_number']:
|
||||
if not field in reviewed_result.keys():
|
||||
raise RequiredFieldException(excArgs=f'reviewed_result.{field}')
|
||||
|
Loading…
Reference in New Issue
Block a user