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

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


  Branch: refs/heads/release-v2.1.2
  Home:   https://github.com/okfn/ckan
  Commit: 4b7d7a8d067affba25b889693e545f1f3477d726
      https://github.com/okfn/ckan/commit/4b7d7a8d067affba25b889693e545f1f3477d726
  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: a48c40495130fb7b76182efed53c6d9de3efc04d
      https://github.com/okfn/ckan/commit/a48c40495130fb7b76182efed53c6d9de3efc04d
  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: 4131f03ae01847f54b7c3d62245bfdbed132e1cd
      https://github.com/okfn/ckan/commit/4131f03ae01847f54b7c3d62245bfdbed132e1cd
  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: d21626452bc35ddd4bd8d8c92bdd50eb9025806e
      https://github.com/okfn/ckan/commit/d21626452bc35ddd4bd8d8c92bdd50eb9025806e
  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: 8172f34e4fac3d2467a548f3905f0a7dd2b7ecb7
      https://github.com/okfn/ckan/commit/8172f34e4fac3d2467a548f3905f0a7dd2b7ecb7
  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: d8a9e5c7b4eca9ee6040b489f69c8d5804d6875d
      https://github.com/okfn/ckan/commit/d8a9e5c7b4eca9ee6040b489f69c8d5804d6875d
  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/82011a282258...d8a9e5c7b4ec


More information about the ckan-changes mailing list