diff --git a/aleksis/core/views.py b/aleksis/core/views.py index a152610104d901943be08dbdf2eb0c788dee6597..a39cbded3de7e874fe332ead89a4b2b4983e623f 100644 --- a/aleksis/core/views.py +++ b/aleksis/core/views.py @@ -1608,7 +1608,12 @@ class ObjectRepresentationView(View): authenticator_class = ObjectAuthenticator.get_object_by_name(authenticator) if not authenticator_class: continue - if authenticator_class().authenticate(request, self.object): + obj = authenticator_class().authenticate(request, self.object) + if obj: + if self.object is None: + self.object = obj + elif obj != self.object: + raise BadRequest("Ambiguous objects identified") return True raise PermissionDenied()