mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-12-09 13:46:21 +08:00
Fix order-by distinct mismatch in protocols list service [SCI-10688]
This commit is contained in:
parent
c9a57caf40
commit
4fc41b08d8
1 changed files with 1 additions and 1 deletions
|
|
@ -14,7 +14,7 @@ module Lists
|
|||
published_versions = @raw_data
|
||||
.in_repository_published_version
|
||||
.order(:parent_id, version_number: :desc)
|
||||
.select('DISTINCT ON (parent_id) protocols.id')
|
||||
.select('DISTINCT ON (protocols.parent_id) protocols.id')
|
||||
new_drafts = @raw_data
|
||||
.where(protocol_type: Protocol.protocol_types[:in_repository_draft], parent_id: nil)
|
||||
.select('protocols.id')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue