darlingtonia 3.0.2 → 3.0.3

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: 11711b29d2398b35a745b5665754f07b661223c189f51d8287f27908b95ee4e8
4
- data.tar.gz: bbfdfe65e50913cbd8c8f83ac6147652d03e72b4ccad67afb36f50ac426b9de7
3
+ metadata.gz: fccf4f74b294b16ddf86169a11cf05fa000acb4d76f2d3e0e53478570925ffbc
4
+ data.tar.gz: f572b72305be4c963cfeafd03375920740fc37b19c6eb9a9fe670c427a704cf7
5
5
  SHA512:
6
- metadata.gz: b6e52bbd0db497a0af9c8d3a64f2bdabb6b4f3ada37dd8814e322b7b4f90d9dfde7a59146a4cd2b28c68d9373c567545821f08344940f42526b3da8a69de2710
7
- data.tar.gz: 4e73d4769c624c6d3e355df81b67d9aef554475512fc7ab4fbc10c2ae968fd89ed37aa9f302dd5760780a15b19b0a7a5aa155f732c811f59687e9b2bc611daf8
6
+ metadata.gz: afd4ad7a896b84d6b51a048cdbfb0d74beb87fc4296296625267741323804ba55e0b78aeb400195e930fcea6401c7323f534d3aba443989237ee783177eca593
7
+ data.tar.gz: d2297c4746b3b797ee90750baad25ec5fa326da33963bf67f73e05b31d1cb2655d0a34876dc3fbeba1e5e78838733699bae9442ce839d63161a685a6bc529bfe
data/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ 3.0.3 - Thu Feb 21, 2019
2
+
3
+ * Bug fix: Ensure there is no files metadata field passed
4
+
5
+ If Hyrax (or perhaps some versions of Hyrax?) receives a metadata field called
6
+ "files" it will not attach files correctly.
7
+
8
+ It causes an exception like this:
9
+
10
+ ```
11
+ ActiveFedora::AssociationTypeMismatch:
12
+ Hydra::PCDM::File(#47055098949460) expected, got String(#47054999182880)
13
+ ```
14
+ This change removes any :files field from the metadata before submitting to Hyrax.
15
+
1
16
  3.0.2 - Thu Feb 21, 2019
2
17
 
3
18
  * Bug fix: Do not fail to log errors if the record is missing a title
@@ -166,6 +166,10 @@ module Darlingtonia
166
166
  attrs = record.attributes.merge(additional_attrs)
167
167
  attrs = attrs.merge(member_of_collections_attributes: { '0' => { id: collection_id } }) if collection_id
168
168
 
169
+ # Ensure nothing is passed in the files field,
170
+ # since this is reserved for Hyrax and is where uploaded_files will be attached
171
+ attrs.delete(:files)
172
+
169
173
  based_near = attrs.delete(:based_near)
170
174
  attrs = attrs.merge(based_near_attributes: based_near_attributes(based_near)) unless based_near.nil? || based_near.empty?
171
175
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Darlingtonia
4
- VERSION = '3.0.2'
4
+ VERSION = '3.0.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: darlingtonia
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.2
4
+ version: 3.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Data Curation Experts