tonyfujs/ddhqa

check_unpublished checking wrong field?

Opened this issue · 1 comments

I think this function is not checking the correct field... It is checking that status = 1. This is the node status, not the publication status.

I found a couple examples where field status is used to differentiate between published and unpublished resources.

  1. Dataset REST API documentation has the example below.

To return only the title and node id of published resources:

http://demo.getdkan.com/api/dataset/node.json?fields=title,nid&parameter[type]=resource&parameter[status]=1

  1. StackOverflow

This behavior is consistent with nodes on DDH that are published vs. not published. Alternatively, we can probably use workbench_moderation and check the current state instead of using status.