-
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
fix: toggle report missing settings #337
Conversation
Adds missing settings to the toggle report. #310
@@ -14,6 +14,11 @@ Change Log | |||
Unreleased | |||
~~~~~~~~~~ | |||
|
|||
[5.1.1] - 2024-01-31 |
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.
Remember to bump the version in code as well.
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.
Someone already updated the version here:
edx-toggles/edx_toggles/__init__.py
Line 5 in c9ed5b0
__version__ = '5.1.1' |
But it was never released: https://pypi.org/project/edx-toggles/
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.
Hah, OK. :-)
@@ -213,7 +213,14 @@ def _add_settings(settings_dict): | |||
""" | |||
Fill the `settings_dict`: will only include values that are set to true or false. | |||
""" | |||
for setting_name, setting_value in vars(settings).items(): |
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.
Was the issue that vars
just doesn't work at all with the settings object?
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.
It works, but only for settings that were previously requested. So if I set a new test setting, and then if I retrieve that setting in middleware, before the view that uses this report, then it starts appearing. I imagine this is due to lazy loading of settings.
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.
Note: I did ensure that the new test I added failed without the fix.
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.
Ah, very interesting. And that makes sense.
Description:
Adds missing settings to the toggle report.
Fixes #310
Merge checklist:
Post merge:
finished.