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

Add more settings to the settings endpoint. #2219

Merged
merged 2 commits into from
Aug 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Stringify the hook functions.
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
  • Loading branch information
jctanner committed Aug 12, 2024
commit edcc168423bf7b8fad70df994e43d9df7ade2a15
6 changes: 6 additions & 0 deletions galaxy_ng/app/api/ui/views/settings.py
Original file line number Diff line number Diff line change
@@ -39,4 +39,10 @@ def get(self, request, *args, **kwargs):
]
settings_dict = settings.as_dict()
data = {key: settings_dict.get(key, None) for key in keyset}

# these might not be strings ...
if data.get("DYNACONF_AFTER_GET_HOOKS") is not None:
data["DYNACONF_AFTER_GET_HOOKS"] = \
[str(func) for func in settings_dict["DYNACONF_AFTER_GET_HOOKS"]]
Comment on lines +45 to +46
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
data["DYNACONF_AFTER_GET_HOOKS"] = \
[str(func) for func in settings_dict["DYNACONF_AFTER_GET_HOOKS"]]
data["DYNACONF_AFTER_GET_HOOKS"] = [
str(func) for func in settings_dict["DYNACONF_AFTER_GET_HOOKS"]
]

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll leave this for another time. I'm in a bit of a hurry to get it merged.


return Response(data)
Loading