[ckan-changes] [okfn/ckan] 974c5d: [#1384] Make the database query in related_list

GitHub noreply at github.com
Tue Dec 17 14:02:55 UTC 2013


  Branch: refs/heads/release-v2.2
  Home:   https://github.com/okfn/ckan
  Commit: 974c5d25e2b9f6787b892f7f9a09cc087fd80cf2
      https://github.com/okfn/ckan/commit/974c5d25e2b9f6787b892f7f9a09cc087fd80cf2
  Author: Nigel Babu <nigelbabu at gmail.com>
  Date:   2013-12-17 (Tue, 17 Dec 2013)

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

  Log Message:
  -----------
  [#1384] Make the database query in related_list

* We didn't actually do the database query in related_list if we
  didn't pass a dataset. This commit fixes that.
* Share the dictize function for both cases.


  Commit: fde6ced270680e15a7c7218b40b848d23dee9d98
      https://github.com/okfn/ckan/commit/fde6ced270680e15a7c7218b40b848d23dee9d98
  Author: Nigel Babu <nigelbabu at gmail.com>
  Date:   2013-12-17 (Tue, 17 Dec 2013)

  Changed paths:
    M ckan/controllers/related.py

  Log Message:
  -----------
  [#1384] Update related controller to use a list

The controller relied on the output of related_list being a
Query object. Updated them to use the list.


  Commit: 54e50ff2d16b531c098243da4ea8fd2196f7fe69
      https://github.com/okfn/ckan/commit/54e50ff2d16b531c098243da4ea8fd2196f7fe69
  Author: Nigel Babu <nigelbabu at gmail.com>
  Date:   2013-12-17 (Tue, 17 Dec 2013)

  Changed paths:
    M ckan/tests/functional/test_related.py

  Log Message:
  -----------
  [#1384] Update tests to deal with list

The tests also relied on related_list being a Query instead of
a list. Updated them and added new asserts.


  Commit: e2db71e1838ddb63cfb1807a758a531332ccde43
      https://github.com/okfn/ckan/commit/e2db71e1838ddb63cfb1807a758a531332ccde43
  Author: Nigel Babu <nigelbabu at gmail.com>
  Date:   2013-12-17 (Tue, 17 Dec 2013)

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

  Log Message:
  -----------
  [#1384] Update documentation for related_list

The related_list function should not need an id or dataset
parameter. We use it ourselves in the related dashboard
without an id or dataset parameter.


  Commit: 7d9231e0c6ad9697714ba5e2ccf5e75f8b165d30
      https://github.com/okfn/ckan/commit/7d9231e0c6ad9697714ba5e2ccf5e75f8b165d30
  Author: Nigel Babu <nigelbabu at gmail.com>
  Date:   2013-12-17 (Tue, 17 Dec 2013)

  Changed paths:
    M ckan/lib/dictization/model_dictize.py

  Log Message:
  -----------
  [#1384] Remove sorted from model_dictize

related_items is already sorted from the database query.
Adding another sorting at the model_dictize level looks
unnecessary and overrides the one from the query.


  Commit: a22c5ee942d2f7fda51b635cbba1d8c5fc197c70
      https://github.com/okfn/ckan/commit/a22c5ee942d2f7fda51b635cbba1d8c5fc197c70
  Author: Nigel Babu <nigelbabu at gmail.com>
  Date:   2013-12-17 (Tue, 17 Dec 2013)

  Changed paths:
    M ckan/controllers/related.py
    M ckan/tests/functional/test_related.py

  Log Message:
  -----------
  [#1384] Fix test broken due to sorted change

* Fix the test broken because it expects results from sorted.
* Correct the PEP8 change in related controller.


Compare: https://github.com/okfn/ckan/compare/7e4fc0819cba...a22c5ee942d2


More information about the ckan-changes mailing list