Browse Source

Add paper_trail to bulk upload objects (#2745)

pull/2732/head^2 v0.4.83
Rachael Booth 2 months ago committed by GitHub
parent
commit
f3d709f6c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      app/models/bulk_upload.rb

2
app/models/bulk_upload.rb

@ -32,6 +32,8 @@ class BulkUpload < ApplicationRecord
scope :filter_by_user, ->(user_id, _user = nil) { user_id.present? ? where(user_id:) : all }
scope :filter_by_uploading_organisation, ->(organisation_id, _user = nil) { where(organisation_id:) }
has_paper_trail
def completed?
incomplete_logs = logs.where.not(status: "completed")
!incomplete_logs.exists?

Loading…
Cancel
Save