Skip to content

Commit

Permalink
Necessary change to prevent check_sequential_award_numbers from cratc…
Browse files Browse the repository at this point in the history
…hing
  • Loading branch information
sambodeme committed Oct 12, 2023
1 parent b7f7a2f commit 1733026
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions backend/audit/intakelib/checks/check_missing_award_numbers.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
from django.core.exceptions import ValidationError
import logging
from audit.intakelib.intermediate_representation import get_range_by_name
from .util import get_message, build_cell_error_tuple

logger = logging.getLogger(__name__)


# FIXME: We need comments on all the validations?
def missing_award_numbers(ir):
ars = get_range_by_name(ir, "award_reference")
Expand All @@ -16,5 +18,6 @@ def missing_award_numbers(ir):
ir, ars, index, get_message("check_missing_award_numbers")
)
)

return errors
if len(errors) > 0:
logger.info("Raising a validation error.")
raise ValidationError(errors)

0 comments on commit 1733026

Please sign in to comment.