Skip to content

Commit

Permalink
Upload pages: don't complain about no value if optional
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed May 17, 2024
1 parent 4c2ae76 commit 12f0628
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion course/page/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ def __init__(self, vctx, location, page_desc):
% {"value": str(page_desc.maximum_megabytes)}))

if vctx is not None:
if not hasattr(page_desc, "value"):
if (
not hasattr(page_desc, "value")
and not getattr(page_desc, "is_optional_page", True)):
vctx.add_warning(location, _("upload question does not have "
"assigned point value"))

Expand Down

0 comments on commit 12f0628

Please sign in to comment.