-
Notifications
You must be signed in to change notification settings - Fork 10
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
Refactor: choices for EnrollmentFlow.system_name #2698
Conversation
b3df575
to
007d906
Compare
12d5324
to
af6e848
Compare
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
8149f4e
to
a42d90b
Compare
this test didn't break with the introduction of system_name choices, but it's still good practice to use a valid system name.
similar to the previous commit, it's best if our test objects align with the actual objects in our app. fix a test that needs the verified type to match the fixture's system_name.
8149f4e
to
588fffe
Compare
Added a screenshot above of user-facing change. (Also, Kegan was correct that Django uses the enum name to generate the display value.) |
I don't think we need to do anything here, but in our I was thinking about when this gets deployed to |
Wouldn't this cause an exception when that slug is looked up in the context dictionary? |
Ahh, that's a good catch @lalver1
What you're pointing out here is that Django only enforces the I suppose we could add logic to the model's |
It would depend on how the look-up is written. For example, in my WIP PR, the look-up of However, the look-up of Definitely open to a differing opinion on how this should work. |
I'm going to add |
I think my initial take was, an exception should be thrown because we have a mismatch / invalid config in this case. E.g. a non-defensive lookup. |
Thanks @angela-tran and @thekaveman for elaborating on this. I agree about adding
|
Ready for review again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! 👍
Makes sense. I'll think about this more in #2689 |
Needed by #2689 for #2632
This PR introduces a
SystemName
choices enum to be used as the possible values forEnrollmentFlow.system_name
. This will be useful for defining flow-specificcontext
dicts .It's helpful to split this out from #2689 so that I can fix unit tests that are broken by the introduction of
choices
toEnrollmentFlow.system_name
.Benefits Admin user-facing change
The
System name
field onEnrollmentFlow
s now is a dropdown with these values: