Commit 8abc318f authored by Jean-Baptiste Pasquier's avatar Jean-Baptiste Pasquier

fix: except on parent (see united4earth /api)

parent cd122ac1
Pipeline #4933 passed with stage
in 1 minute and 21 seconds
from django.core.exceptions import PermissionDenied
from django.db.models.base import ModelBase
from django.urls import Resolver404
from rest_framework.permissions import BasePermission
......@@ -93,7 +92,7 @@ class LDPPermissions(BasePermission):
try:
obj = Model.resolve_parent(request.path)
model = view.parent_model
except Resolver404:
except:
obj = None
model = view.model
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment