Skip to content

Commit

Permalink
Adding admin prior ref waiver creation case
Browse files Browse the repository at this point in the history
  • Loading branch information
phildominguez-gsa committed Nov 15, 2024
1 parent b95f789 commit 96f043f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions backend/audit/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,18 @@ def save_model(self, request, obj, form, change):
logger.info(
f"Duplicate finding reference number waiver applied to SAC {sac.report_id} by user: {request.user.email}."
)
elif (
STATUS.IN_PROGRESS
and SacValidationWaiver.TYPES.PRIOR_REFERENCES
in obj.waiver_types
):
logger.info(
f"User {request.user.email} is applying waiver for SAC with status: {sac.submission_status}"
)
super().save_model(request, obj, form, change)
logger.info(
f"Invalid prior reference waiver applied to SAC {sac.report_id} by user: {request.user.email}."
)
else:
messages.set_level(request, messages.WARNING)
messages.warning(
Expand Down

0 comments on commit 96f043f

Please sign in to comment.