Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add default order for items by created_at #541

Merged
merged 5 commits into from
Jun 3, 2022

Conversation

juanmahidalgo
Copy link
Contributor

@juanmahidalgo juanmahidalgo commented Jun 3, 2022

Closes #538

@coveralls
Copy link

coveralls commented Jun 3, 2022

Pull Request Test Coverage Report for Build 2435095237

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 68.783%

Totals Coverage Status
Change from base Build 2417007494: 0.0%
Covered Lines: 2572
Relevant Lines: 3567

💛 - Coveralls

Comment on lines 203 to 208
WHERE items.collection_id = ANY(${collectionIds})
AND ${
status && status === CurationStatus.PENDING
? SQL`items.blockchain_item_id IS NULL`
: SQL`1 = 1`
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The blockchain_item_id is independent from the curation status as it's set once the collection is published.
Standard items don't have curation statuses, their collection can have (once it changes and is up to re-review) a curation so I wouldn't mix that concept in the query unless we wanted to get the items of a collection with a pending status.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this that case? The status is for the items that are getting asked.
If we're asking for pending items, shouldn't we return the ones with blockchain_item_id NOT null? I might be missing something here..

@juanmahidalgo juanmahidalgo changed the title fix: filter correctly the standard items in pending status fix: add default order for items by created_at Jun 3, 2022
@juanmahidalgo juanmahidalgo merged commit 901d5f0 into master Jun 3, 2022
@juanmahidalgo juanmahidalgo deleted the fix/curation-showing-unpublished-items branch June 3, 2022 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modifying a third party item results in the item being last in the item's pages of the collection
3 participants