-
Notifications
You must be signed in to change notification settings - Fork 147
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
pass config to deposit_create and deposit_edit #2889
base: master
Are you sure you want to change the base?
pass config to deposit_create and deposit_edit #2889
Conversation
As @utnapischtim pointed out there is another place where the URL is hardcoded: Line 165 in f159176
I'll check if this can use the passed config as well |
As this is unrelated to this PR I'd vote for creating a new Issue for this |
@@ -385,11 +385,14 @@ def deposit_create(community=None): | |||
community_theme = community.get("theme", {}) | |||
|
|||
community_use_jinja_header = bool(community_theme) | |||
|
|||
dashboard_uploads_route = current_app.config["APP_RDM_USER_DASHBOARD_ROUTES"][ |
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.
Hey, thinking out loud, can we maybe pass down the dashboard
routes object and just use the uploads
subkey on the places that needed it? I am thinking e.g. you might need in some point to connect to /me/communities
so it would be more flexible to have the information available. What do you think?
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.
dashboard_uploads_route = current_app.config["APP_RDM_USER_DASHBOARD_ROUTES"][ | |
dashboard_routes = current_app.config["APP_RDM_USER_DASHBOARD_ROUTES"] |
❤️ Thank you for your contribution!
Description
In order to fix inveniosoftware/invenio-rdm-records#1846 this passes
current_app.config["APP_RDM_USER_DASHBOARD_ROUTES"]["uploads"]
to the deposit form react app.Checklist
Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:
Reminder
By using GitHub, you have already agreed to the GitHub’s Terms of Service including that: