Skip to content

Commit

Permalink
fix test - 2
Browse files Browse the repository at this point in the history
  • Loading branch information
amCap1712 committed Sep 26, 2022
1 parent c390db8 commit 9f68870
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion critiquebrainz/frontend/forms/review.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def validate_license_choice(self, field):
else:
# https://wtforms.readthedocs.io/en/2.3.x/_modules/wtforms/validators/#InputRequired
if not field.raw_data or not field.raw_data[0]:
raise ValidationError(lazy_gettext("You need to choose a license"))
raise ValidationError(lazy_gettext("You need to choose a license."))

# choice validation for RadioField's is done in pre_validate in WTForms which executes prior to
# this validator. it does not take into consideration whether the review is draft or not so we
Expand Down
1 change: 0 additions & 1 deletion critiquebrainz/frontend/views/test/test_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ def test_draft_without_license_choice(self):

# test publishing draft review without license causes error
data["state"] = "publish"
data["rating"] = 4
response = self.client.post(
"/review/%s/edit" % review["id"],
data=data,
Expand Down

0 comments on commit 9f68870

Please sign in to comment.