[ckan-changes] [ckan/ckan] 179ede: Stop package_create polluting the context it is pa...

GitHub noreply at github.com
Fri Jun 29 10:09:12 UTC 2018


  Branch: refs/heads/stop-package-create-mangling-context
  Home:   https://github.com/ckan/ckan
  Commit: 179ede9b7621f5b2cc4c03fa2a84cc7f4dc3b5a2
      https://github.com/ckan/ckan/commit/179ede9b7621f5b2cc4c03fa2a84cc7f4dc3b5a2
  Author: Ross Jones <ross at mailbolt.com>
  Date:   2018-06-29 (Fri, 29 Jun 2018)

  Changed paths:
    M ckan/logic/action/create.py

  Log Message:
  -----------
  Stop package_create polluting the context it is passed.

Although there are bigger discussions around mutable context (see
https://github.com/ckan/ideas-and-roadmap/issues/53 for more details)

`package_create`, at the end of the function, pollutes the context with
the package model and the id of the newly created package, just to call
another function.

As is done elsewhere in this function, this PR copies the context and
uses that in order to avoid issues with context dict re-use, until the
wider issue can be resolved.



      **NOTE:** This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the ckan-changes mailing list