mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-31 06:56:33 +02:00
linter and test fixes
This commit is contained in:
parent
342ddc0e5f
commit
d887a7514a
5 changed files with 88 additions and 81 deletions
|
@ -3738,11 +3738,13 @@ class DomainAdmin(ListHeaderAdmin, ImportExportModelAdmin):
|
|||
# Using variables to get past the linter
|
||||
message1 = f"Cannot delete Domain when in state {obj.state}"
|
||||
message2 = f"This subdomain is being used as a hostname on another domain: {err.note}"
|
||||
message3 = f"Command failed with note: {err.note}"
|
||||
# Human-readable mappings of ErrorCodes. Can be expanded.
|
||||
error_messages = {
|
||||
# noqa on these items as black wants to reformat to an invalid length
|
||||
ErrorCode.OBJECT_STATUS_PROHIBITS_OPERATION: message1,
|
||||
ErrorCode.OBJECT_ASSOCIATION_PROHIBITS_OPERATION: message2,
|
||||
ErrorCode.COMMAND_FAILED: message3,
|
||||
}
|
||||
|
||||
message = "Cannot connect to the registry"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue