fix(exports): display exact number of dossiers count at time generation
This commit is contained in:
parent
640f729413
commit
428b869181
3 changed files with 61 additions and 11 deletions
|
@ -51,6 +51,7 @@ class Export < ApplicationRecord
|
|||
end
|
||||
|
||||
def compute
|
||||
self.dossiers_count = dossiers_for_export.count
|
||||
load_snapshot!
|
||||
|
||||
file.attach(blob.signed_id) # attaching a blob directly might run identify/virus scanner and wipe it
|
||||
|
@ -109,9 +110,10 @@ class Export < ApplicationRecord
|
|||
end
|
||||
|
||||
def count
|
||||
if procedure_presentation_id.present?
|
||||
dossiers_for_export.count
|
||||
end
|
||||
return dossiers_count if !dossiers_count.nil? # export generated
|
||||
return dossiers_for_export.count if procedure_presentation_id.present?
|
||||
|
||||
nil
|
||||
end
|
||||
|
||||
def procedure
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue