mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-22 18:56:15 +02:00
Merge pull request #2046 from cisagov/rh/2909-new-agency-field
ISSUE #2029: Add new model for new federal agency field
This commit is contained in:
commit
564537cf7d
5 changed files with 63 additions and 2 deletions
|
@ -979,7 +979,9 @@ class DomainInformationAdmin(ListHeaderAdmin):
|
||||||
"classes": ["collapse"],
|
"classes": ["collapse"],
|
||||||
"fields": [
|
"fields": [
|
||||||
"federal_type",
|
"federal_type",
|
||||||
"federal_agency",
|
# "updated_federal_agency",
|
||||||
|
# Above field commented out so it won't display
|
||||||
|
"federal_agency", # TODO: remove later
|
||||||
"tribe_name",
|
"tribe_name",
|
||||||
"federally_recognized_tribe",
|
"federally_recognized_tribe",
|
||||||
"state_recognized_tribe",
|
"state_recognized_tribe",
|
||||||
|
@ -1218,7 +1220,9 @@ class DomainRequestAdmin(ListHeaderAdmin):
|
||||||
"classes": ["collapse"],
|
"classes": ["collapse"],
|
||||||
"fields": [
|
"fields": [
|
||||||
"federal_type",
|
"federal_type",
|
||||||
"federal_agency",
|
# "updated_federal_agency",
|
||||||
|
# Above field commented out so it won't display
|
||||||
|
"federal_agency", # TODO: remove later
|
||||||
"tribe_name",
|
"tribe_name",
|
||||||
"federally_recognized_tribe",
|
"federally_recognized_tribe",
|
||||||
"state_recognized_tribe",
|
"state_recognized_tribe",
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
# Generated by Django 4.2.10 on 2024-04-18 22:45
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
("registrar", "0085_alter_contact_first_name_alter_contact_last_name_and_more"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name="domaininformation",
|
||||||
|
name="updated_federal_agency",
|
||||||
|
field=models.ForeignKey(
|
||||||
|
blank=True,
|
||||||
|
help_text="Associated federal agency",
|
||||||
|
null=True,
|
||||||
|
on_delete=django.db.models.deletion.PROTECT,
|
||||||
|
to="registrar.federalagency",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name="domainrequest",
|
||||||
|
name="updated_federal_agency",
|
||||||
|
field=models.ForeignKey(
|
||||||
|
blank=True,
|
||||||
|
help_text="Associated federal agency",
|
||||||
|
null=True,
|
||||||
|
on_delete=django.db.models.deletion.PROTECT,
|
||||||
|
to="registrar.federalagency",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
|
@ -29,8 +29,18 @@ class DomainInformation(TimeStampedModel):
|
||||||
|
|
||||||
BranchChoices = DomainRequest.BranchChoices
|
BranchChoices = DomainRequest.BranchChoices
|
||||||
|
|
||||||
|
# TODO for #1975: Delete this after we run the new migration
|
||||||
AGENCY_CHOICES = DomainRequest.AGENCY_CHOICES
|
AGENCY_CHOICES = DomainRequest.AGENCY_CHOICES
|
||||||
|
|
||||||
|
updated_federal_agency = models.ForeignKey(
|
||||||
|
"registrar.FederalAgency",
|
||||||
|
on_delete=models.PROTECT,
|
||||||
|
help_text="Associated federal agency",
|
||||||
|
unique=False,
|
||||||
|
blank=True,
|
||||||
|
null=True,
|
||||||
|
)
|
||||||
|
|
||||||
# This is the domain request user who created this domain request. The contact
|
# This is the domain request user who created this domain request. The contact
|
||||||
# information that they gave is in the `submitter` field
|
# information that they gave is in the `submitter` field
|
||||||
creator = models.ForeignKey(
|
creator = models.ForeignKey(
|
||||||
|
|
|
@ -449,6 +449,15 @@ class DomainRequest(TimeStampedModel):
|
||||||
blank=True,
|
blank=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
updated_federal_agency = models.ForeignKey(
|
||||||
|
"registrar.FederalAgency",
|
||||||
|
on_delete=models.PROTECT,
|
||||||
|
help_text="Associated federal agency",
|
||||||
|
unique=False,
|
||||||
|
blank=True,
|
||||||
|
null=True,
|
||||||
|
)
|
||||||
|
|
||||||
# This is the domain request user who created this domain request. The contact
|
# This is the domain request user who created this domain request. The contact
|
||||||
# information that they gave is in the `submitter` field
|
# information that they gave is in the `submitter` field
|
||||||
creator = models.ForeignKey(
|
creator = models.ForeignKey(
|
||||||
|
|
|
@ -1862,6 +1862,8 @@ class TestDomainRequestAdmin(MockEppLib):
|
||||||
"updated_at",
|
"updated_at",
|
||||||
"status",
|
"status",
|
||||||
"rejection_reason",
|
"rejection_reason",
|
||||||
|
"updated_federal_agency",
|
||||||
|
# TODO: once approved, we'll have to remove above from test
|
||||||
"creator",
|
"creator",
|
||||||
"investigator",
|
"investigator",
|
||||||
"generic_org_type",
|
"generic_org_type",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue