Skip to content

Commit

Permalink
Add paper_trail to bulk upload objects (#2745)
Browse files Browse the repository at this point in the history
  • Loading branch information
RachaelBooth authored Nov 1, 2024
1 parent 51bc0cf commit f3d709f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/bulk_upload.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down

0 comments on commit f3d709f

Please sign in to comment.