-
Notifications
You must be signed in to change notification settings - Fork 17
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
Conversation
Pull Request Test Coverage Report for Build 2435095237
💛 - Coveralls |
src/Item/Item.model.ts
Outdated
WHERE items.collection_id = ANY(${collectionIds}) | ||
AND ${ | ||
status && status === CurationStatus.PENDING | ||
? SQL`items.blockchain_item_id IS NULL` | ||
: SQL`1 = 1` | ||
} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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..
Closes #538