From 991bd9df329f6c8ccd8a22f71426b8883dc5585c Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Fri, 1 Feb 2019 04:19:14 -0400 Subject: [PATCH] Insert the external object into the view Signed-off-by: Roberto Rosario --- mayan/apps/common/mixins.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mayan/apps/common/mixins.py b/mayan/apps/common/mixins.py index e2592217e6..868052424d 100644 --- a/mayan/apps/common/mixins.py +++ b/mayan/apps/common/mixins.py @@ -80,6 +80,10 @@ class ExternalObjectMixin(object): external_object_pk_url_kwargs = None # Usage: {'pk': 'pk'} external_object_queryset = None + def dispatch(self, *args, **kwargs): + self.external_object = self.get_external_object() + return super(ExternalObjectMixin, self).dispatch(*args, **kwargs) + def get_pk_url_kwargs(self): pk_url_kwargs = {}