Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: model cleanups for the Admin #2078

Merged
merged 2 commits into from
May 3, 2024
Merged

Fix: model cleanups for the Admin #2078

merged 2 commits into from
May 3, 2024

Conversation

thekaveman
Copy link
Member

Closes #2065

  • implements the __str__ method on AuthProvider so it gets a human-readable label in the Admin

Closes #2072

  • removes the override of blank = False from SecretNameField to prevent validation errors in the Admin

since it is not a required field on many models

overriding blank=False made it so a model could not be
saved in the Admin without providing a value
so it gets a more normal label in Admin screens
@thekaveman thekaveman self-assigned this May 3, 2024
@thekaveman thekaveman requested a review from a team as a code owner May 3, 2024 15:09
@github-actions github-actions bot added back-end Django views, sessions, middleware, models, migrations etc. tests Related to automated testing (unit, UI, integration, etc.) migrations [auto] Review for potential model changes/needed data migrations updates deployment-dev [auto] Changes that will trigger a deploy if merged to dev and removed tests Related to automated testing (unit, UI, integration, etc.) back-end Django views, sessions, middleware, models, migrations etc. labels May 3, 2024
Copy link

github-actions bot commented May 3, 2024

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  benefits/core
  models.py
Project Total  

This report was generated by python-coverage-comment-action

Copy link
Member

@angela-tran angela-tran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me

@thekaveman thekaveman merged commit 7cf6349 into dev May 3, 2024
18 checks passed
@thekaveman thekaveman deleted the fix/admin-models branch May 3, 2024 18:19
@thekaveman
Copy link
Member Author

thekaveman commented May 3, 2024

Confirming on dev:

AuthProvider has friendlier names now (sort of):

image

EligibilityVerifier.api_auth_key_secret_name can now be blank:

image

@thekaveman
Copy link
Member Author

I might open a follow up ticket to add a label field to the AuthProvider since the client names can be the same, and that doesn't really say as much. Anyway, better than Auth provider (0) for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment-dev [auto] Changes that will trigger a deploy if merged to dev migrations [auto] Review for potential model changes/needed data migrations updates
Projects
None yet
2 participants