Version 1.2.2

This commit is contained in:
Corey Oordt 2013-07-07 15:54:30 -05:00
parent b22da41567
commit a254fe9087
2 changed files with 4 additions and 3 deletions

View file

@ -2,7 +2,7 @@ __version_info__ = {
'major': 1,
'minor': 2,
'micro': 2,
'releaselevel': 'beta',
'releaselevel': 'final',
'serial': 1
}

View file

@ -78,8 +78,9 @@ class CategoryBase(MPTTModel):
class CategoryBaseAdminForm(forms.ModelForm):
def clean_slug(self):
if self.instance is None or not ALLOW_SLUG_CHANGE:
self.cleaned_data['slug'] = slugify(self.cleaned_data['name'])
if not self.cleaned_data.get('slug', None):
if self.instance is None or not ALLOW_SLUG_CHANGE:
self.cleaned_data['slug'] = slugify(SLUG_TRANSLITERATOR(self.cleaned_data['name']))
return self.cleaned_data['slug'][:50]
def clean(self):