Skip to content

Commit

Permalink
Merge pull request #6118 from samvera/5844-save-embargoes-better
Browse files Browse the repository at this point in the history
5844-save-embargoes-better
  • Loading branch information
alishaevn authored Jul 25, 2023
2 parents 9339f23 + d7ab85f commit 37dcea9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/models/hyrax/resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ def embargo=(value)
end

def embargo
@embargo ||= Hyrax.query_service.find_by(id: embargo_id) if embargo_id.present?
return @embargo if @embargo
@embargo = Hyrax.query_service.find_by(id: embargo_id) if embargo_id.present?
end

protected
Expand Down

0 comments on commit 37dcea9

Please sign in to comment.