Fix the assignment of 'locations' in context

This commit is contained in:
Carlos G?lvez 2019-12-12 09:51:53 +01:00
parent 9e0dfc8150
commit fef525dcb4
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ class Move(metaclass=PoolMeta):
@classmethod
def __setup__(cls):
super(Move, cls).__setup__()
cls.lot.context['locations'] = [Eval('from_location')]
cls.lot.context['locations'] = If(Eval('from_location'), [Eval('from_location')], [])
if 'from_location' not in cls.lot.depends:
cls.lot.depends.append('from_location')
cls.lot.loading = 'lazy'