Revision API issues #1564
This commit is contained in:
parent
d5312aea06
commit
be919d2bd7
@ -416,6 +416,8 @@ class DmsfFileRevision < ApplicationRecord
|
|||||||
end
|
end
|
||||||
# ActionParameters => Hash
|
# ActionParameters => Hash
|
||||||
h = DmsfFileRevision.params_to_hash(values)
|
h = DmsfFileRevision.params_to_hash(values)
|
||||||
|
# From a REST API call we don't get "20" => "Project" but "CustomFieldValue20" => "Project"
|
||||||
|
h.transform_keys! { |key| key.to_i.zero? && key.to_s.match(/(\d+)/) ? :Regexp.last_match(0) : key }
|
||||||
# Super
|
# Super
|
||||||
self.custom_field_values = h
|
self.custom_field_values = h
|
||||||
# For a new revision we need to duplicate attachments
|
# For a new revision we need to duplicate attachments
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user