From ac9e032e87484db9915f03afdc7a70ddad038c04 Mon Sep 17 00:00:00 2001 From: Eugene Alvin Villar Date: Thu, 20 Oct 2016 23:39:31 +0800 Subject: [PATCH] Fix 502 errors on resources list page --- cadasta/resources/views/default.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cadasta/resources/views/default.py b/cadasta/resources/views/default.py index cc603c5d5..543a8cf76 100644 --- a/cadasta/resources/views/default.py +++ b/cadasta/resources/views/default.py @@ -36,6 +36,11 @@ def filter_archived_resources(self, view, obj): def get_resource_list(self): return self.get_queryset() + def get_context_data(self, *args, **kwargs): + context = super().get_context_data(*args, **kwargs) + context['success_url'] = None + return context + class ProjectResourcesAdd(LoginPermissionRequiredMixin, mixins.ProjectResourceMixin, @@ -102,6 +107,7 @@ def get_context_data(self, *args, **kwargs): ] context['attachment_list'] = attachment_list + context['success_url'] = None return context