mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-31 15:06:32 +02:00
Add checks for other fields
This commit is contained in:
parent
4d4cd8257c
commit
d416ea5138
2 changed files with 36 additions and 35 deletions
|
@ -77,15 +77,15 @@ class FSMErrorCodes(IntEnum):
|
|||
"""Used when doing FSM transitions.
|
||||
Overview of generic error codes:
|
||||
- 1 APPROVE_DOMAIN_IN_USE The domain is already in use
|
||||
- 2 APPROVE_NO_INVESTIGATOR No investigator is assigned when approving
|
||||
- 3 APPROVE_INVESTIGATOR_NOT_STAFF Investigator is a non-staff user
|
||||
- 4 APPROVE_INVESTIGATOR_NOT_SUBMITTER The form submitter is not the investigator
|
||||
- 2 NO_INVESTIGATOR No investigator is assigned
|
||||
- 3 INVESTIGATOR_NOT_STAFF Investigator is a non-staff user
|
||||
- 4 INVESTIGATOR_NOT_SUBMITTER The form submitter is not the investigator
|
||||
"""
|
||||
|
||||
APPROVE_DOMAIN_IN_USE = 1
|
||||
APPROVE_NO_INVESTIGATOR = 2
|
||||
APPROVE_INVESTIGATOR_NOT_STAFF = 3
|
||||
APPROVE_INVESTIGATOR_NOT_SUBMITTER = 4
|
||||
NO_INVESTIGATOR = 2
|
||||
INVESTIGATOR_NOT_STAFF = 3
|
||||
INVESTIGATOR_NOT_SUBMITTER = 4
|
||||
|
||||
|
||||
# (Q for reviewers) What should this be called?
|
||||
|
@ -98,10 +98,10 @@ class ApplicationStatusError(Exception):
|
|||
|
||||
_error_mapping = {
|
||||
FSMErrorCodes.APPROVE_DOMAIN_IN_USE: ("Cannot approve. Requested domain is already in use."),
|
||||
FSMErrorCodes.APPROVE_NO_INVESTIGATOR: ("Cannot approve. No investigator was assigned."),
|
||||
FSMErrorCodes.APPROVE_INVESTIGATOR_NOT_STAFF: ("Cannot approve. Investigator is not a staff user."),
|
||||
FSMErrorCodes.APPROVE_INVESTIGATOR_NOT_SUBMITTER: (
|
||||
"Cannot approve. Only the assigned investigator can approve this application."
|
||||
FSMErrorCodes.NO_INVESTIGATOR: ("No investigator was assigned."),
|
||||
FSMErrorCodes.INVESTIGATOR_NOT_STAFF: ("Investigator is not a staff user."),
|
||||
FSMErrorCodes.INVESTIGATOR_NOT_SUBMITTER: (
|
||||
"Only the assigned investigator can make this change."
|
||||
),
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue