Skip to content

Commit

Permalink
chore: rename message variable
Browse files Browse the repository at this point in the history
Signed-off-by: Kathurima Kimathi <kathurimakimathi415@gmail.com>
  • Loading branch information
KathurimaKimathi committed Jul 19, 2023
1 parent 3ec033a commit 8274a95
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mycarehub/content/wagtail_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,18 @@ def before_publish_page(request, page):

if page.specific_class == ContentItem:
if page.item_type == "AUDIO_VIDEO" and page.featured_media.count() == 0:
msg = (
message = (
"an AUDIO_VIDEO content item must have at least one video "
"or audio file before publication"
)
raise ValidationError(msg)
raise ValidationError(message)

if page.item_type == "PDF_DOCUMENT" and page.documents.count() == 0:
msg = (
message = (
"a PDF_DOCUMENT content item must have at least one document "
"attached before publication"
)
raise ValidationError(msg)
raise ValidationError(message)


@hooks.register("after_create_page")
Expand Down

0 comments on commit 8274a95

Please sign in to comment.