Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def save(self, commit=True):
- try:
- # instance = super(CategoryForm, self).save(commit=False)
- instance = super(CategoryForm, self).save()
- return instance
- except Exception as e:
- if isinstance(e, CategoryRootCheckError):
- self.add_error('title', '')
- self.add_error('parent', '')
- raise forms.ValidationError(e)
Advertisement
Add Comment
Please, Sign In to add comment