dor-services 5.22.1 → 5.22.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dor/models/concerns/identifiable.rb +8 -7
- data/lib/dor/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de7497db757f5546559abd987007ee78487e13f9
|
4
|
+
data.tar.gz: 56d444f210ebbe03556525bcc64ce69bc0cf083a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61bff550675570ac7ff5e8e0943b23640ee83d410d0fc5f871f2b559de9223924d4a526e966545d5c9a892c8495a0f7f5008b31a16f992833cb9cc55be48ab8d
|
7
|
+
data.tar.gz: 3e3d14df2b71a29ec2ebee2aaad532029308c93bf333bc02862e42984c58dca9aaedbcb6a2b0158643910185674a16890c6546b45c2967696b6f9947b1a57e48
|
@@ -102,17 +102,18 @@ module Dor
|
|
102
102
|
# @return [String] same value, as per Ruby assignment convention
|
103
103
|
def catkey=(val)
|
104
104
|
|
105
|
-
#
|
106
|
-
|
105
|
+
if val != catkey && !catkey.blank? # if there was already a catkey in the record, store that in the "previous" spot (assuming there is no change)
|
106
|
+
identityMetadata.add_otherId("#{PREVIOUS_CATKEY_TYPE_ID}:#{catkey}")
|
107
|
+
end
|
107
108
|
|
108
|
-
# if
|
109
|
-
|
109
|
+
if val.blank? # if we are setting the catkey to blank, remove the node from XML
|
110
|
+
remove_other_Id(CATKEY_TYPE_ID)
|
111
|
+
elsif catkey.blank? # if there is no current catkey, then add it
|
110
112
|
add_other_Id(CATKEY_TYPE_ID,val)
|
111
|
-
elsif
|
112
|
-
identityMetadata.add_otherId("#{PREVIOUS_CATKEY_TYPE_ID}:#{current_catkey}")
|
113
|
-
# and then update the current catkey to the new value
|
113
|
+
elsif # if there is a current catkey, update the current catkey to the new value
|
114
114
|
update_other_Id(CATKEY_TYPE_ID,val)
|
115
115
|
end
|
116
|
+
|
116
117
|
val
|
117
118
|
end
|
118
119
|
|
data/lib/dor/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dor-services
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.22.
|
4
|
+
version: 5.22.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Klein
|
@@ -14,7 +14,7 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date: 2017-
|
17
|
+
date: 2017-03-01 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: active-fedora
|