aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2016-11-11 01:08:52 +0200
committerFilipp Lepalaan <filipp@mac.com>2016-11-11 01:08:52 +0200
commit37d98e8288469fc1d2df9e5589f1f94169e0c435 (patch)
tree3f008d81b170d75bdda8921b0d540934fae1e5a0
parentbad0bc0d6c6cb4bf8807515af7462c51132b08e6 (diff)
downloadServo-37d98e8288469fc1d2df9e5589f1f94169e0c435.tar.gz
Servo-37d98e8288469fc1d2df9e5589f1f94169e0c435.tar.bz2
Servo-37d98e8288469fc1d2df9e5589f1f94169e0c435.zip
Show error message on errors
-rw-r--r--servo/views/device.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/servo/views/device.py b/servo/views/device.py
index 2032a15..dd69414 100644
--- a/servo/views/device.py
+++ b/servo/views/device.py
@@ -14,7 +14,7 @@ from django.views.decorators.cache import cache_page
from servo.lib.utils import paginate
from servo.models import (Device, Order, Product, GsxAccount,
- ServiceOrderItem, Customer,)
+ ServiceOrderItem, Customer,)
from servo.forms.devices import DeviceForm, DeviceUploadForm, DeviceSearchForm
@@ -153,6 +153,8 @@ def edit_device(request, pk=None, product_line=None, model=None):
pk=device.pk,
product_line=device.product_line,
model=device.slug)
+ else:
+ messages.error(request, form.errors)
data = prep_detail_view(request, pk, product_line, model)
data['form'] = form