labimotion 2.0.0.rc1 → 2.0.0.rc2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ba4a246b95d088b7928826074a223b671bd3ff8ac7c4bce5904ff983aec1534
4
- data.tar.gz: c1393205315928947b688566db60ac311eef1fcfccedbb395e521a2dbdfdfbdd
3
+ metadata.gz: 608624a39eb174198e63db9cde2e4440425aa6bad1c604801c817ea13caea859
4
+ data.tar.gz: c691e2f9e670d301acc2494745e02836bf8ffcb1479c86c747f02ff9fadc6617
5
5
  SHA512:
6
- metadata.gz: fbf716f60ca698f40f332b318d55747266d23ffa0c066f2afb5eff44f90c54db1402d8b42e251641fa1564aff167c79abe86411c519653c59ffbca36991a85fd
7
- data.tar.gz: 4dbeae09a3740df12533e217e11d4fbc003894280ccc9d6f46e2042cf4b0ff4b2ce448215a9d918e38b077458caba39e26c55a31870b9e9e7f753f8d25bfc41b
6
+ metadata.gz: e3c03f09293537ad8993158d1e1871fff2bf6a84ff88d90ca5d55af663fa862df4907a72639a2cdfb4bb7a2371911bf37b146cc97fbf0030945d3c23b5777de9
7
+ data.tar.gz: c746e80182b677d03c5bf06608285441a7b7022fdfcf521aec2aeaab61470d7a774ce059919d35e4b671446890b4055e3707da8b9a7f2fa52b4446fe52fbf655
@@ -30,7 +30,7 @@ module Labimotion
30
30
  source_id: params[:source_id],
31
31
  layer_id: params[:layer_id],
32
32
  field_id: params[:name],
33
- identifier: params[:source_id],
33
+ identifier: SecureRandom.uuid,
34
34
  created_by: current_user.id,
35
35
  properties: declared(params, include_missing: false),
36
36
  }
@@ -21,9 +21,10 @@ module Labimotion
21
21
 
22
22
  case voc['source']
23
23
  when Labimotion::Prop::ELEMENT
24
- if voc['identifier'] == 'element.name'
24
+ voc['source_name'] = ElementKlass.find_by(identifier: voc['source_id'])&.label
25
+ # if voc['identifier'] == 'element.name'
25
26
  # voc['source_name'] = ElementKlass.find_by(identifier: voc['source_id'])&.name
26
- end
27
+ # end
27
28
  when Labimotion::Prop::SEGMENT
28
29
  voc['source_name'] = SegmentKlass.find_by(identifier: voc['source_id'])&.label
29
30
  when Labimotion::Prop::DATASET
@@ -131,8 +131,8 @@ module Labimotion
131
131
  end
132
132
  element.save_segments(segments: params[:segments], current_user_id: current_user.id)
133
133
  element.reload
134
- element.properties = update_vocabularies(element.properties, current_user, element)
135
- element.save!
134
+ new_properties = update_vocabularies(element.properties, current_user, element)
135
+ element.update_column(:properties, new_properties)
136
136
  element
137
137
  rescue StandardError => e
138
138
  Labimotion.log_exception(e, current_user)
@@ -55,7 +55,7 @@
55
55
  "id": 4,
56
56
  "identifier": "user-name",
57
57
  "name": "creator",
58
- "label": "creator",
58
+ "label": "Creator",
59
59
  "field_type": "text",
60
60
  "opid": 9,
61
61
  "term_id": "NCIT_C42628",
@@ -2,5 +2,5 @@
2
2
 
3
3
  ## Labimotion Version
4
4
  module Labimotion
5
- VERSION = '2.0.0.rc1'
5
+ VERSION = '2.0.0.rc2'
6
6
  end
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: 2.0.0.rc1
4
+ version: 2.0.0.rc2
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-12-06 00:00:00.000000000 Z
12
+ date: 2024-12-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails