lims_industry: fix package type type on change

This commit is contained in:
Sebastian Marro 2023-11-10 00:30:43 -03:00
parent 5d41c2aaff
commit 069d8e8c0e
1 changed files with 2 additions and 1 deletions

View File

@ -608,7 +608,8 @@ class CreateSampleStart(metaclass=PoolMeta):
if self.packages:
ind_volume = 0
for p in self.packages:
ind_volume += (p.quantity * p.type.capacity)
if p.type and p.type.capacity:
ind_volume += p.quantity * p.type.capacity
return ind_volume
return None