Delete offset allocations in transition save.

This commit is contained in:
Sergio Morillo 2016-10-11 09:54:17 +02:00
parent 13f6e247c0
commit bfc835443d
1 changed files with 2 additions and 2 deletions

View File

@ -324,8 +324,8 @@ class YieldAllocate(Wizard):
offset_allocs = []
for sd in self.summary.details:
for i in range(1, 4):
offset_qty = getattr(sd, 'offset_%s' % i, 0)
if offset_qty > 0:
offset_qty = getattr(sd, 'offset_%s' % i, 0) or 0
if offset_qty != 0:
offset_allocs.append(
{'procedure': procedure.id,
'offset_': i,