diff --git a/src/registrar/admin.py b/src/registrar/admin.py index 4f2d2bbe0..53d397667 100644 --- a/src/registrar/admin.py +++ b/src/registrar/admin.py @@ -1017,7 +1017,7 @@ class ContactAdmin(ListHeaderAdmin, ImportExportModelAdmin): return super().changelist_view(request, extra_context=extra_context) -class SeniorOfficialAdmin(ListHeaderAdmin, ImportExportModelAdmin): +class SeniorOfficialAdmin(ListHeaderAdmin): """Custom Senior Official Admin class.""" # NOTE: these are just placeholders. Not part of ACs (haven't been defined yet). Update in future tickets. @@ -1031,13 +1031,6 @@ class SeniorOfficialAdmin(ListHeaderAdmin, ImportExportModelAdmin): # in autocomplete_fields for user ordering = ["first_name", "last_name"] - fieldsets = [ - ( - None, - {"fields": ["first_name", "last_name", "title", "phone"]}, - ) - ] - class WebsiteResource(resources.ModelResource): """defines how each field in the referenced model should be mapped to the corresponding fields in the diff --git a/src/registrar/migrations/0105_seniorofficial_portfolio_senior_official.py b/src/registrar/migrations/0105_seniorofficial_portfolio_senior_official.py index 76cc6c0cb..1937039dd 100644 --- a/src/registrar/migrations/0105_seniorofficial_portfolio_senior_official.py +++ b/src/registrar/migrations/0105_seniorofficial_portfolio_senior_official.py @@ -1,9 +1,8 @@ -# Generated by Django 4.2.10 on 2024-06-20 21:16 +# Generated by Django 4.2.10 on 2024-06-21 19:26 from django.db import migrations, models import django.db.models.deletion import phonenumber_field.modelfields -import registrar.models.federal_agency class Migration(migrations.Migration): @@ -27,13 +26,17 @@ class Migration(migrations.Migration): phonenumber_field.modelfields.PhoneNumberField(blank=True, max_length=128, null=True, region=None), ), ], + options={ + "abstract": False, + }, ), migrations.AddField( model_name="portfolio", name="senior_official", field=models.ForeignKey( - default=registrar.models.federal_agency.FederalAgency.get_non_federal_agency, + blank=True, help_text="Associated senior official", + null=True, on_delete=django.db.models.deletion.PROTECT, to="registrar.seniorofficial", ), diff --git a/src/registrar/models/portfolio.py b/src/registrar/models/portfolio.py index d48baa601..b189ccded 100644 --- a/src/registrar/models/portfolio.py +++ b/src/registrar/models/portfolio.py @@ -43,7 +43,8 @@ class Portfolio(TimeStampedModel): on_delete=models.PROTECT, help_text="Associated senior official", unique=False, - default=FederalAgency.get_non_federal_agency, + null=True, + blank=True ) organization_type = models.CharField( diff --git a/src/registrar/models/senior_official.py b/src/registrar/models/senior_official.py index 001dee579..cbe19d873 100644 --- a/src/registrar/models/senior_official.py +++ b/src/registrar/models/senior_official.py @@ -11,16 +11,6 @@ class SeniorOfficial(TimeStampedModel): managing Portfolios. """ - class Meta: - """Contains meta information about this class""" - - # Placeholder for later tickets... - # indexes = [ - # models.Index(fields=["user"]), - # models.Index(fields=["email"]), - # ] - - first_name = models.CharField( null=False, blank=False,