Fixing merge conflicts

This commit is contained in:
zandercymatics 2023-09-12 15:46:17 -06:00
parent 4f45a90d15
commit 971a6fd986
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
3 changed files with 28 additions and 8 deletions

View file

@ -193,6 +193,31 @@ class DomainAdmin(ListHeaderAdmin):
# If no matching action button is found, return the super method # If no matching action button is found, return the super method
return super().response_change(request, obj) return super().response_change(request, obj)
def do_delete_domain(self, request, obj):
try:
obj.deleted()
obj.save()
except Exception as err:
self.message_user(request, err, messages.ERROR)
else:
self.message_user(
request,
("Domain %s Should now be deleted " ". Thanks!") % obj.name,
)
return HttpResponseRedirect(".")
def do_get_status(self, request, obj):
try:
statuses = obj.statuses
except Exception as err:
self.message_user(request, err, messages.ERROR)
else:
self.message_user(
request,
("Domain statuses are %s" ". Thanks!") % statuses,
)
return HttpResponseRedirect(".")
def do_place_client_hold(self, request, obj): def do_place_client_hold(self, request, obj):
try: try:
obj.place_client_hold() obj.place_client_hold()

View file

@ -1,4 +1,4 @@
# Generated by Django 4.2.1 on 2023-09-11 12:44 # Generated by Django 4.2.1 on 2023-09-12 21:40
from django.db import migrations, models from django.db import migrations, models
import django_fsm import django_fsm
@ -6,7 +6,7 @@ import django_fsm
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
("registrar", "0030_alter_user_status"), ("registrar", "0032_merge_0031_alter_domain_state_0031_transitiondomain"),
] ]
operations = [ operations = [
@ -20,6 +20,7 @@ class Migration(migrations.Migration):
("ready", "Ready"), ("ready", "Ready"),
("client hold", "On Hold"), ("client hold", "On Hold"),
("deleted", "Deleted"), ("deleted", "Deleted"),
("onhold", "Onhold"),
], ],
default="unknown", default="unknown",
help_text="Very basic info about the lifecycle of this domain object", help_text="Very basic info about the lifecycle of this domain object",

View file

@ -121,12 +121,6 @@ class Domain(TimeStampedModel, DomainHelper):
# previously existed but has been deleted from the registry # previously existed but has been deleted from the registry
DELETED = "deleted" DELETED = "deleted"
# the state is indeterminate
UNKNOWN = "unknown"
# the ready state for a domain object
READY = "ready"
# when a domain is on hold # when a domain is on hold
ONHOLD = "onhold" ONHOLD = "onhold"