- def clean(self, *args, **kwargs):
- if not self.cleaned_data['books'] and not self.cleaned_data['audiobooks']:
- msg = ugettext(u"One of these fields is required.")
- self._errors["books"] = self.error_class([msg])
- self._errors["audiobooks"] = self.error_class([msg])
- return super(PublishingSuggestForm, self).clean(*args, **kwargs)
+ def clean(self):
+ if not self.cleaned_data['ebook'] and not self.cleaned_data['audiobook']:
+ msg = ugettext("One of these options is required.")
+ self._errors['ebook'] = self.error_class([msg])
+ self._errors['audiobook'] = self.error_class([msg])
+ return super(PublishingSuggestForm, self).clean()