X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/4e1191300b4ebea295dee07769dc9da4e7149395..457864d91747076c222916d35071f53cb3f700f8:/contrib/gilbert/plugins/models.py?ds=sidebyside diff --git a/contrib/gilbert/plugins/models.py b/contrib/gilbert/plugins/models.py index b765482..5217df3 100644 --- a/contrib/gilbert/plugins/models.py +++ b/contrib/gilbert/plugins/models.py @@ -215,10 +215,10 @@ class ModelAdmin(Plugin): form = self.form_class(request.POST, request.FILES, instance=instance) - try: + if form.is_valid(): saved = form.save() return True, None, saved.pk - except ValueError: + else: return False, form.errors def data_serialize_object(self, obj):