fix test for ISBN

pull/1/head
eric 2013-12-27 16:35:23 -05:00
parent feae5a36aa
commit 073e9664c0
1 changed files with 1 additions and 1 deletions

View File

@ -124,7 +124,7 @@ class EditionForm(forms.ModelForm):
description = forms.CharField( required=False, widget= forms.Textarea(attrs={'cols': 80, 'rows': 2})) description = forms.CharField( required=False, widget= forms.Textarea(attrs={'cols': 80, 'rows': 2}))
def clean(self): def clean(self):
if not self.cleaned_data["isbn"] and not self.cleaned_data["oclc"] and not self.cleaned_data["goog"]: if not self.cleaned_data.get("isbn",False) and not self.cleaned_data.get("oclc",False) and not self.cleaned_data.get("goog",False):
raise forms.ValidationError(_("There must be either an ISBN or an OCLC number.")) raise forms.ValidationError(_("There must be either an ISBN or an OCLC number."))
return self.cleaned_data return self.cleaned_data