labimotion 1.4.0.rc4 → 1.4.0.rc5

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: f38f255a309e305ddfe715e5382c0087acde8a05c42434a8c87c03640ad38772
4
- data.tar.gz: a3ed70fa27d008b51f416fbd4ac9a2ce70e1d3cc117bdfa37e31010a62301b98
3
+ metadata.gz: 587b32cc2f374e118a3570bbe34a69a497ec9e6d2134757d9241ad6c90b416ec
4
+ data.tar.gz: 4a778699fb7c40c7aa3383cc2cabfb910218a616f122d0b748d092262d2ee370
5
5
  SHA512:
6
- metadata.gz: e80ca22f7120c4d3f34b9eecc37baa2b40a83b7d34409b4598129bb939e1c473ed6fa7fe06c7c2396210dc25571238b1bc51733fafb373e8928c076aa8761fe2
7
- data.tar.gz: 70ddf10ed69d7eea7ac3769e3a32dd59b38b3eed052ba232e9cdbadacaa2ef6bab9ea204537390c2abe71f06246ac9eeb650b2731b28d92ad8d1bc0d534d4b38
6
+ metadata.gz: 1c20c57d746b3c6d0f771781fb3bf44eda10062f0ca577cb06e6c4aed1bcceb8f8f0be7556d2cb3e310010aa38c9de14ef791309fe829ef1d591b8782ac5c29a
7
+ data.tar.gz: 760ae347f5842287bdf7d04074d55d38cdac15cf61fa540c87295f049c1547fea20fba669997172db08fcbb2f570abd3bf1b4fdbb5774e41d163645e41512e15
@@ -47,8 +47,12 @@ module Labimotion
47
47
  begin
48
48
  data.fetch('Labimotion::Dataset', {}).each do |uuid, fields|
49
49
  klass_id = fields['dataset_klass_id']
50
- dk_obj = data.fetch('Labimotion::DatasetKlass', {})[klass_id]
51
- dk_id = dk_obj['identifier']
50
+ next if data.fetch('Labimotion::DatasetKlass', {}).empty?
51
+
52
+ dk_obj = data.fetch('Labimotion::DatasetKlass', {}) && data.fetch('Labimotion::DatasetKlass', {})[klass_id]
53
+ next if dk_obj.nil?
54
+
55
+ dk_id = dk_obj && dk_obj['identifier']
52
56
  element_uuid = fields.fetch('element_id')
53
57
  element_type = fields.fetch('element_type')
54
58
  element = instances.fetch(element_type).fetch(element_uuid)
@@ -78,7 +82,7 @@ module Labimotion
78
82
  end
79
83
  rescue StandardError => e
80
84
  Labimotion.log_exception(e)
81
- raise
85
+ # raise
82
86
  end
83
87
  end
84
88
 
@@ -23,7 +23,7 @@ module Labimotion
23
23
  def deactivate_klass(params)
24
24
  klz = fetch_klass(params[:klass], params[:id])
25
25
  klz&.update!(is_active: params[:is_active])
26
- generate_klass_file unless klz.class.name != 'ElementKlass'
26
+ generate_klass_file unless klz.class.name != 'Labimotion::ElementKlass'
27
27
  klz
28
28
  rescue StandardError => e
29
29
  Labimotion.log_exception(e, current_user)
@@ -34,7 +34,7 @@ module Labimotion
34
34
  authenticate_admin!(params[:klass].gsub(/(Klass)/, 's').downcase)
35
35
  klz = fetch_klass(params[:klass], params[:id])
36
36
  klz&.destroy!
37
- generate_klass_file unless klz.class.name != 'ElementKlass'
37
+ generate_klass_file unless klz.class.name != 'Labimotion::ElementKlass'
38
38
  status 201
39
39
  rescue StandardError => e
40
40
  Labimotion.log_exception(e, current_user)
@@ -2,5 +2,5 @@
2
2
 
3
3
  ## Labimotion Version
4
4
  module Labimotion
5
- VERSION = '1.4.0.rc4'
5
+ VERSION = '1.4.0.rc5'
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: 1.4.0.rc4
4
+ version: 1.4.0.rc5
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-06-25 00:00:00.000000000 Z
12
+ date: 2024-07-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails