Skip to content

Commit

Permalink
chore(models): remove dupe field on TransitAgency
Browse files Browse the repository at this point in the history
this field is now captured on EnrollmentFlow with the other
Eligibility API fields
  • Loading branch information
thekaveman committed Nov 26, 2024
1 parent 8243740 commit bfde2e5
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 16 deletions.
1 change: 0 additions & 1 deletion benefits/core/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ def get_exclude(self, request, obj=None):
return [
"eligibility_api_private_key",
"eligibility_api_public_key",
"eligibility_api_jws_signing_alg",
"transit_processor_client_id",
"transit_processor_client_secret_name",
"transit_processor_audience",
Expand Down
11 changes: 4 additions & 7 deletions benefits/core/migrations/0032_optionalfields.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ class Migration(migrations.Migration):
help_text="The absolute base URL for the TransitProcessor's control portal, including https://.",
),
),
migrations.RemoveField(
model_name="transitagency",
name="eligibility_api_jws_signing_alg",
),
migrations.RenameField(
model_name="transitagency", old_name="eligibility_index_template", new_name="eligibility_index_template_override"
),
Expand Down Expand Up @@ -72,13 +76,6 @@ class Migration(migrations.Migration):
blank=True, default="", help_text="The identifier for this agency used in Eligibility API calls."
),
),
migrations.AlterField(
model_name="transitagency",
name="eligibility_api_jws_signing_alg",
field=models.TextField(
blank=True, default="", help_text="The JWS-compatible signing algorithm used in Eligibility API calls."
),
),
migrations.AlterField(
model_name="transitagency",
name="eligibility_api_private_key",
Expand Down
1 change: 0 additions & 1 deletion benefits/core/migrations/local_fixtures.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
"eligibility_api_id": "cst",
"eligibility_api_private_key": 2,
"eligibility_api_public_key": 3,
"eligibility_api_jws_signing_alg": "RS256",
"transit_processor": 1,
"transit_processor_audience": "",
"transit_processor_client_id": "",
Expand Down
5 changes: 0 additions & 5 deletions benefits/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,6 @@ class TransitAgency(models.Model):
blank=True,
default=None,
)
eligibility_api_jws_signing_alg = models.TextField(
help_text="The JWS-compatible signing algorithm used in Eligibility API calls.",
blank=True,
default="",
)
transit_processor = models.ForeignKey(
TransitProcessor,
on_delete=models.PROTECT,
Expand Down
2 changes: 1 addition & 1 deletion benefits/eligibility/verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def eligibility_from_api(flow: models.EnrollmentFlow, form, agency: models.Trans
headers={flow.eligibility_api_auth_header: flow.eligibility_api_auth_key},
issuer=settings.ALLOWED_HOSTS[0],
agency=agency.eligibility_api_id,
jws_signing_alg=agency.eligibility_api_jws_signing_alg,
jws_signing_alg=flow.eligibility_api_jws_signing_alg,
client_private_key=agency.eligibility_api_private_key_data,
jwe_encryption_alg=flow.eligibility_api_jwe_encryption_alg,
jwe_cek_enc=flow.eligibility_api_jwe_cek_enc,
Expand Down
1 change: 0 additions & 1 deletion tests/pytest/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ def model_TransitAgency(model_PemData, model_TransitProcessor):
eligibility_api_id="test123",
eligibility_api_private_key=model_PemData,
eligibility_api_public_key=model_PemData,
eligibility_api_jws_signing_alg="alg",
index_template_override="core/agency-index.html",
eligibility_index_template_override="eligibility/index.html",
logo_large="agencies/cst-lg.png",
Expand Down

0 comments on commit bfde2e5

Please sign in to comment.