labimotion 1.1.0 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6f7936de192e1d9fe1f8bacc78699fc0bf97ac70a8527ef82401b58822e3c34
|
4
|
+
data.tar.gz: 419291e71d602c493841fd560abb7c3fabd1959e6fa5217b71eb40f0ff15ef38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bfd9d6c59caabdeb559230074000e3e79ffb7bf30699a70b94358bbf7551c31652c4cd85ab20dda6fc902e556e7440ad7243b4452752cf543e462b0ac9dd721
|
7
|
+
data.tar.gz: ba6e063f02f5930c687d23d857ddc71446889d19ae9461b4bfc5600ebdbdac4c39bc1d36196041e0f3bbdb6c9b95502c76639ce2e5c05ff1752dd366ba35cf0b
|
@@ -18,7 +18,7 @@ module Labimotion
|
|
18
18
|
elsif result[:metadata] == nil
|
19
19
|
Labimotion::ConState::NONE
|
20
20
|
else
|
21
|
-
data = process(att, id,
|
21
|
+
data = process(att, id, result[:metadata])
|
22
22
|
generate_ds(id, att.attachable_id, data, current_user)
|
23
23
|
Labimotion::ConState::COMPLETED
|
24
24
|
end
|
@@ -7,7 +7,7 @@ module Labimotion
|
|
7
7
|
module Segmentable
|
8
8
|
extend ActiveSupport::Concern
|
9
9
|
included do
|
10
|
-
has_many :segments, as: :element, dependent: :destroy, class_name: 'Labimotion::Segment'
|
10
|
+
has_many :segments, -> { select('DISTINCT ON (element_type, segment_klass_id) *').order(element_type: :asc, segment_klass_id: :asc, id: :desc) }, as: :element, dependent: :destroy, class_name: 'Labimotion::Segment'
|
11
11
|
end
|
12
12
|
|
13
13
|
def copy_segments(**args)
|
@@ -52,10 +52,11 @@ module Labimotion
|
|
52
52
|
props['uuid'] = uuid
|
53
53
|
props['klass'] = 'Segment'
|
54
54
|
props = Labimotion::SampleAssociation.update_sample_association(props, args[:current_user_id])
|
55
|
-
segment = Labimotion::Segment.
|
55
|
+
segment = Labimotion::Segment.where(element_type: self.class.name, element_id: self.id, segment_klass_id: seg['segment_klass_id']).order(id: :desc).first
|
56
56
|
if segment.present? && (segment.klass_uuid != props['klass_uuid'] || segment.properties != props)
|
57
57
|
segment.update!(properties_release: klass.properties_release, properties: props, uuid: uuid, klass_uuid: props['klass_uuid'])
|
58
58
|
segments.push(segment)
|
59
|
+
Labimotion::Segment.where(element_type: self.class.name, element_id: self.id, segment_klass_id: seg['segment_klass_id']).where.not(id: segment.id).destroy_all
|
59
60
|
end
|
60
61
|
next if segment.present?
|
61
62
|
|
data/lib/labimotion/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: labimotion
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chia-Lin Lin
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-01-
|
12
|
+
date: 2024-01-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|