Fixed creation function that caused entities to be wrong-named in certain circumstances. Server now starts and shutsdown without tracebacks.

This commit is contained in:
Griatch 2015-01-01 21:13:36 +01:00
parent 3d557f6bf9
commit 0b01df1fcc
3 changed files with 9 additions and 6 deletions

View file

@ -444,9 +444,10 @@ class Script(ScriptBase):
cdict = self._createdict
updates = []
if not cdict["key"]:
self.db_key = "#%i" % self.dbid
updates.append("db_key")
elif self.key != cdict["db_key"]:
if not self.db_key:
self.db_key = "#%i" % self.dbid
updates.append("db_key")
elif self.db_key != cdict["db_key"]:
self.db_key = cdict["key"]
updates.append("db_key")
if cdict["interval"] and self.interval != cdict["interval"]: