Skip to content

Commit

Permalink
Merge pull request #1790 from datadryad/bug-fix
Browse files Browse the repository at this point in the history
Allow creation of resource publication when one does not yet exist
  • Loading branch information
ahamelers authored Jul 30, 2024
2 parents 1f4f2d3 + accc38f commit b0b218f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/stash_engine/admin_datasets_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def popup
)
when 'publication'
authorize %i[stash_engine admin_datasets], :data_popup?
@publication = StashEngine::ResourcePublication.find_or_initialize_by(resource_id: @identifier.latest_resource.id)
@publication = StashEngine::ResourcePublication.find_or_create_by(resource_id: @identifier.latest_resource.id)
when 'data'
authorize %i[stash_engine admin_datasets], :data_popup?
setup_internal_data_list
Expand Down

0 comments on commit b0b218f

Please sign in to comment.