mirror of
https://github.com/jazzband/django-categories.git
synced 2026-03-16 22:30:24 +00:00
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:
parent
96748afeb4
commit
f55f131655
1 changed files with 5 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue