[core] Fixes bug in graph.add_chain output that would ignore the first node when its index is 0.

This commit is contained in:
Romain Dorgueil
2018-01-10 08:33:12 +01:00
parent c1ffbe7b5f
commit 8900c567d9

View File

@ -64,7 +64,7 @@ class Graph:
if _name in self.named:
raise KeyError('Duplicate name {!r} in graph.'.format(_name))
self.named[_name] = _last
if not _first:
if _first is None:
_first = _last
self.outputs_of(_input, create=True).add(_last)
_input = _last