Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jrgriffiniii committed Apr 28, 2023
1 parent e9531da commit 68ff3e0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/models/work.rb
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,11 @@ def s3_query_service
end

def past_snapshots
UploadSnapshot.find_or_initialize_by(work: self)
persisted = UploadSnapshot.where(work: self)
return persisted unless persisted.empty?

built = UploadSnapshot.new(work: self)
[built]
end

def select_current_snapshots
Expand Down

0 comments on commit 68ff3e0

Please sign in to comment.