Skip to content

Commit

Permalink
Merge pull request #6355 from samvera/valk-fix-add-file-version
Browse files Browse the repository at this point in the history
Make fileset representative_id and thumbnail_id readonly in form
  • Loading branch information
dlpierce authored Oct 10, 2023
2 parents 3d8038b + 88c8f4b commit 191c31a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
4 changes: 2 additions & 2 deletions app/forms/hyrax/forms/file_set_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ class FileSetForm < Hyrax::Forms::ResourceForm
# be configurable.
include Hyrax::FormFields(:file_set_metadata)

property :representative_id, type: Valkyrie::Types::String
property :thumbnail_id, type: Valkyrie::Types::String
property :representative_id, type: Valkyrie::Types::String, writeable: false
property :thumbnail_id, type: Valkyrie::Types::String, writeable: false
end
end
end
8 changes: 0 additions & 8 deletions app/models/hyrax/file_set.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,6 @@ def representative_id
id
end

##
# @return [Valkyrie::ID]
def representative_id=(_input)
# saving a file set using valkyrie would err because this method didn't exist.
Rails.logger.warn('This is not a valid method for file sets')
id
end

##
# @return [Boolean] true
def pcdm_object?
Expand Down

0 comments on commit 191c31a

Please sign in to comment.