Allow default logo_s3_key prefix in ownership check
All checks were successful
Deploy Beta (NATIVE) / deploy (push) Successful in 26s
All checks were successful
Deploy Beta (NATIVE) / deploy (push) Successful in 26s
This commit is contained in:
parent
e93b63f988
commit
37ebcac45f
1 changed files with 1 additions and 1 deletions
|
|
@ -175,7 +175,7 @@ class ProfileView(APIView):
|
|||
|
||||
# Check permissions & s3 keys
|
||||
logo_key = request.data.get('logo_s3_key', profile.logo_s3_key)
|
||||
if logo_key and not logo_key.startswith(f"suppliers/{user.id}/"):
|
||||
if logo_key and not logo_key.startswith(f"suppliers/{user.id}/") and not logo_key.startswith("suppliers/default/"):
|
||||
return Response({'error': 'Invalid logo_s3_key ownership'}, status=status.HTTP_400_BAD_REQUEST)
|
||||
|
||||
profile.phone = request.data.get('phone', profile.phone)
|
||||
|
|
|
|||
Loading…
Reference in a new issue