def form_invalid(self, form):
        result = super(SingleObjectEditView, self).form_invalid(form)

        try:
            messages.error(
                self.request,
                _(
                    'Error saving %s details.'
                ) % self.extra_context['object_name']
            )
        except __HOLE__:
            messages.error(
                self.request, _('Error saving details.')
            )

        return result
dataset/ETHPy150Open mayan-edms/mayan-edms/mayan/apps/common/generics.py/SingleObjectEditView.form_invalid