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

GitHub noreply at github.com
Tue Jul 31 12:19:41 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/ckan/ckan
  Commit: dd9e919ede8a415fb8b671e576a49e83655e0161
      https://github.com/ckan/ckan/commit/dd9e919ede8a415fb8b671e576a49e83655e0161
  Author: Ross Jones <ross at mailbolt.com>
  Date:   2018-06-29 (Fri, 29 Jun 2018)

  Changed paths:
    M ckan/logic/action/create.py
    M ckan/tests/logic/action/test_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.


  Commit: ba3a2201793c21ef62d8ee03e5ba36b1d754a159
      https://github.com/ckan/ckan/commit/ba3a2201793c21ef62d8ee03e5ba36b1d754a159
  Author: Ross Jones <ross at mailbolt.com>
  Date:   2018-07-04 (Wed, 04 Jul 2018)

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

  Log Message:
  -----------
  Remove the unnecessary copy of the context.

The copied context is no longer required for the REST API, and so we can
safely remove it.


  Commit: 86289d119e7b2f787fe828ccec5d9697d028930e
      https://github.com/ckan/ckan/commit/86289d119e7b2f787fe828ccec5d9697d028930e
  Author: Ian Ward <ian at excess.org>
  Date:   2018-07-31 (Tue, 31 Jul 2018)

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

  Log Message:
  -----------
  Merge pull request #4315 from ckan/stop-package-create-mangling-context

Stop package_create polluting the context it is passed.


Compare: https://github.com/ckan/ckan/compare/e51d4dd5525c...86289d119e7b
      **NOTE:** This service has 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