We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4102764 commit 64ca18bCopy full SHA for 64ca18b
ckanext/oauth2/plugin.py
@@ -165,10 +165,13 @@ def _allowed_endpoint(endpoint):
165
toolkit.h.flash_notice(
166
toolkit._("Please complete your account setup.")
167
)
168
- response.headers["Location"] = toolkit.url_for(
169
- "oauth2.account_update"
170
- )
171
- response.status_code = 302
+ if toolkit.request.endpoint == "approval_dataset.download_resource":
+ return response
+ else:
+ response.headers["Location"] = toolkit.url_for(
172
+ "oauth2.account_update"
173
+ )
174
+ response.status_code = 302
175
return response
176
elif account_state == "pending":
177
if toolkit.request.endpoint == "approval_dataset.download_resource":
0 commit comments