Skip to content

Commit

Permalink
rubocop friendyly fire (#320)
Browse files Browse the repository at this point in the history
  • Loading branch information
orangewolf authored Aug 18, 2021
1 parent 5f589f9 commit 134cc77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/factories/bulkrax/object_factory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def run!
def update
raise "Object doesn't exist" unless object
destroy_existing_files if @replace_files && klass != Collection
attrs = update
attrs = attribute_update
run_callbacks :save do
klass == Collection ? update_collection(attrs) : work_actor.update(environment(attrs))
end
Expand Down Expand Up @@ -201,7 +201,7 @@ def create_attributes

# Strip out the :collection key, and add the member_of_collection_ids,
# which is used by Hyrax::Actors::AddAsMemberOfCollectionsActor
def update_attributes
def attribute_update
return transform_attributes.except(:id) if klass == Collection
if attributes[:collection].present?
transform_attributes.except(:id).except(:collection).merge(member_of_collections_attributes: { 0 => { id: collection.id } })
Expand Down

0 comments on commit 134cc77

Please sign in to comment.