-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Group/about calls setup_template_variables with an empty context #1433
Comments
ghost
assigned wardi
Jan 21, 2014
if @wardi could comment, I'll take it on |
@davidread I added the call to _setup_template_variables because it was missing before 05c27ce and I needed it in my about page, but I didn't need any context values. I'm sure you're right, the context should be set up in the normal way instead. |
ghost
assigned davidread
Jan 22, 2014
Cheers Ian, I'll add this in then. |
davidread
pushed a commit
that referenced
this issue
Jan 23, 2014
PR now merged into master (and may go into CKAN 2.2) |
davidread
pushed a commit
that referenced
this issue
Jan 28, 2014
davidread
pushed a commit
that referenced
this issue
Jan 28, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
setup_template_variables is normally called supplying a context with model, session and user. However the Group About page seems an exception, where the context is {}.
https://github.com/okfn/ckan/blob/05c5c2cb260aa6b518bbd5ee2612f45780780cb1/ckan/controllers/group.py#L846
Is there any reason to deprive this of the model etc.? Is this a place where only logic methods should be called? Or can I add in the proper context here?
Specifically, this affects my hierarchy extension:
https://github.com/datagovuk/ckanext-hierarchy/blob/57ada7ba765881f2ffd696d25da30de69684c1bd/ckanext/hierarchy/plugin.py#L41
The text was updated successfully, but these errors were encountered: