handle not initialized stat, e.g. when a class with existing objects is derived from Stateful later
This commit is contained in:
parent
cb365aaea2
commit
cc696ee87d
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,7 @@ class Stateful(object):
|
|||
|
||||
def getStateObject(self):
|
||||
states = self.getStatesDefinition().states
|
||||
if self.state not in states:
|
||||
if self.getState() not in states:
|
||||
self.state = self.getStatesDefinition().initialState
|
||||
return states[self.state]
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue