mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-11-08 07:21:03 +08:00
Merge pull request #7608 from scinote-eln/hotfix/1.33.0.1
Hotfix/1.33.0.1
This commit is contained in:
commit
e80d43c759
1 changed files with 3 additions and 3 deletions
|
|
@ -10,14 +10,14 @@ module Lists
|
|||
original_without_versions = @raw_data
|
||||
.where.missing(:published_versions)
|
||||
.in_repository_published_original
|
||||
.select(:id)
|
||||
.select('protocols.id')
|
||||
published_versions = @raw_data
|
||||
.in_repository_published_version
|
||||
.order(:parent_id, version_number: :desc)
|
||||
.select('DISTINCT ON (parent_id) 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(:id)
|
||||
.select('protocols.id')
|
||||
|
||||
@records = Protocol.where('protocols.id IN (?) OR protocols.id IN (?) OR protocols.id IN (?)',
|
||||
original_without_versions, published_versions, new_drafts)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue