[ckan-changes] [okfn/ckan] 1ed767: [#1251] Fix error on getting the newly created res...

GitHub noreply at github.com
Thu Dec 19 15:24:13 UTC 2013


  Branch: refs/heads/1251-resource-view
  Home:   https://github.com/okfn/ckan
  Commit: 1ed767dd193a50af7abe74e039775e4ecc84155d
      https://github.com/okfn/ckan/commit/1ed767dd193a50af7abe74e039775e4ecc84155d
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-12-19 (Thu, 19 Dec 2013)

  Changed paths:
    M ckan/lib/datapreview.py

  Log Message:
  -----------
  [#1251] Fix error on getting the newly created resources

We need to get the new resources to be able to create the default resource
views. To do so, we use the session's _object_cache. The problem is that the
current session might not have an _object_cache. This happens when the
transaction hasn't been flushed yet, or when it has been flushed but no new
objects were created.

This change supports both cases.




More information about the ckan-changes mailing list