from wagtail.contrib.modeladmin.views import InspectView


class PositionInspectView(InspectView):
    def get_context_data(self, **kwargs):
        context = super(PositionInspectView, self).get_context_data(**kwargs)
        context['appointed_applications'] = self.get_appointed_applications
        context['submitted_applications'] = self.get_submitted_applications
        return context

    def get_appointed_applications(self):
        return self.instance.applications.filter(
            status='appointed'
        )

    def get_submitted_applications(self):
        return self.instance.applications.filter(
            status='submitted'
        )

@@ -556,32 +556,244 @@
 ications(self):%0A
+        # Since roles that arent role type styrelse or fum get automatically%0A        # set to approved we need to show applications with status approved%0A        # when inspecting a role. This is a temporary fix.%0A
         return s
@@ -844,17 +844,22 @@
   status
-=
+__in=%5B
 'submitt
@@ -857,23 +857,36 @@
 %5B'submitted'
+, 'approved'%5D
 %0A        )%0A

Fix so that applications are showed when inspecting a role (#358)