Skip to content

Commit

Permalink
Merge branch 'hotfix'
Browse files Browse the repository at this point in the history
  • Loading branch information
pta2002 committed May 22, 2017
2 parents 2aaced0 + 998bde0 commit 61bffc9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions shop/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,6 @@ def __init__(self, *args, **kwargs):

def clean_rating(self):
data = self.cleaned_data
if not 1 <= data['rating'] <= 5:
raise forms.ValidationError("Rating should be between 1 and 5")
return int(data['rating'])

0 comments on commit 61bffc9

Please sign in to comment.