[Event system] Check that the script has valid non-attributes before using it
This commit is contained in:
parent
9af1c36a93
commit
8b150ce419
1 changed files with 1 additions and 0 deletions
|
|
@ -57,6 +57,7 @@ def register_events(path_or_typeclass):
|
||||||
try:
|
try:
|
||||||
storage = ScriptDB.objects.get(db_key="event_handler")
|
storage = ScriptDB.objects.get(db_key="event_handler")
|
||||||
assert storage.is_active
|
assert storage.is_active
|
||||||
|
assert storage.ndb.events is not None
|
||||||
except (ScriptDB.DoesNotExist, AssertionError):
|
except (ScriptDB.DoesNotExist, AssertionError):
|
||||||
storage = EVENTS
|
storage = EVENTS
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue