From 4afdac2b00ede575ef61457e4a81f9a5ceb557f3 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Thu, 5 Dec 2019 05:58:31 -0400 Subject: [PATCH] Add missing transformation view message display Signed-off-by: Roberto Rosario --- HISTORY.rst | 2 ++ mayan/apps/converter/views.py | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/HISTORY.rst b/HISTORY.rst index 64f2b3eb2d..37d0738115 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -5,6 +5,8 @@ - Don't exit GitLab makefile target if the branch to delete doesn't exist. - Automatically create transformations from the selection form that doesn't have arguments. +- Add missing message displays for transformation error creation and + not argument transformation creation. 3.3.2 (2019-12-05) ================== diff --git a/mayan/apps/converter/views.py b/mayan/apps/converter/views.py index 43ba459390..7633a508c2 100644 --- a/mayan/apps/converter/views.py +++ b/mayan/apps/converter/views.py @@ -2,6 +2,7 @@ from __future__ import absolute_import, unicode_literals import logging +from django.contrib import messages from django.http import HttpResponseRedirect from django.template import RequestContext from django.urls import reverse @@ -57,6 +58,10 @@ class TransformationCreateView( instance.save() except Exception as exception: logger.debug('Invalid form, exception: %s', exception) + messages.error( + message=_('Error creating transforamtion: %s.') % exception, + request=self.request + ) return super(TransformationCreateView, self).form_invalid(form) else: return super(TransformationCreateView, self).form_valid(form) @@ -284,6 +289,11 @@ class TransformationSelectView( name=form.cleaned_data['transformation'] ) + messages.success( + message=_('Transformation created successfully.'), + request=self.request + ) + return HttpResponseRedirect( redirect_to=reverse( viewname='converter:transformation_list', kwargs={