New transition method to force unknown state

This commit is contained in:
Neil Martinsen-Burrell 2023-12-01 10:45:20 -06:00
parent 8dad9ea320
commit 01b1e3e520
No known key found for this signature in database
GPG key ID: 6A3C818CC10D0184

View file

@ -1338,6 +1338,19 @@ class Domain(TimeStampedModel, DomainHelper):
logger.info("Changing to DNS_NEEDED state") logger.info("Changing to DNS_NEEDED state")
logger.info("able to transition to DNS_NEEDED state") logger.info("able to transition to DNS_NEEDED state")
@transition(
field="state",
source="*",
target=State.UNKNOWN,
)
def force_unknown(self):
"""Force a domain to go into our unknown state.
This can be useful on a limited basis when we need a domain
to be created in the registry for some reason.
"""
pass
def _disclose_fields(self, contact: PublicContact): def _disclose_fields(self, contact: PublicContact):
"""creates a disclose object that can be added to a contact Create using """creates a disclose object that can be added to a contact Create using
.disclose= <this function> on the command before sending. .disclose= <this function> on the command before sending.