Fixed an exception error

Fixed an exception error that occurs when an empty form is submitted for apps that are created using categories.base.CategoryBase.
This commit is contained in:
Brent O'Connor 2012-10-10 10:17:39 -07:00
parent 96748afeb4
commit f55f131655

View file

@ -82,7 +82,12 @@ class CategoryBaseAdminForm(forms.ModelForm):
return self.cleaned_data['slug'][:50]
def clean(self):
super(CategoryBaseAdminForm, self).clean()
if not self.is_valid():
return self.cleaned_data
opts = self._meta
# Validate slug is valid in that level