extract operation_logs_and_signatures method
This commit is contained in:
parent
9414d499b8
commit
437e871f79
1 changed files with 12 additions and 6 deletions
|
@ -146,13 +146,19 @@ class PiecesJustificativesService
|
|||
].flatten.compact
|
||||
|
||||
if !for_expert
|
||||
bill_signatures = dossier.dossier_operation_logs.filter_map(&:bill_signature).uniq
|
||||
pjs += [
|
||||
dossier.dossier_operation_logs.map(&:serialized),
|
||||
bill_signatures.map(&:serialized),
|
||||
bill_signatures.map(&:signature)
|
||||
].flatten.compact
|
||||
pjs += operation_logs_and_signatures(dossier)
|
||||
end
|
||||
|
||||
pjs
|
||||
end
|
||||
|
||||
def self.operation_logs_and_signatures(dossier)
|
||||
bill_signatures = dossier.dossier_operation_logs.filter_map(&:bill_signature).uniq
|
||||
|
||||
[
|
||||
dossier.dossier_operation_logs.map(&:serialized),
|
||||
bill_signatures.map(&:serialized),
|
||||
bill_signatures.map(&:signature)
|
||||
].flatten.compact
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue