def get(self, request, *args, **kwargs): try: export_instance = FormExportInstance.get(self.export_id) except ResourceNotFound: # If it's not found, try and see if it's on the legacy system before throwing a 404 try: export_helper = make_custom_export_helper(self.request, self.export_type, self.domain, self.export_id) export_instance = convert_saved_export_to_export_instance(export_helper.custom_export) except ResourceNotFound: raise Http404() schema = self.get_export_schema(export_instance) self.export_instance = self.export_instance_cls.generate_instance_from_schema( schema, saved_export=export_instance ) return super(BaseEditNewCustomExportView, self).get(request, *args, **kwargs)
def export_helper(self): try: return make_custom_export_helper(self.request, self.export_type, self.domain, self.export_id) except ResourceNotFound: raise Http404()
def export_helper(self): return make_custom_export_helper(self.request, self.export_type, domain=self.domain)
def export_helper(self): try: return make_custom_export_helper(self.request, self.export_type, self.domain, self.export_id) except ResourceNotFound: raise Http404()
def export_helper(self): return make_custom_export_helper(self.request, self.export_type, domain=self.domain)