[Event system] Check that the script has valid non-attributes before using it

This commit is contained in:
Vincent Le Goff 2017-06-12 13:32:08 -07:00
parent 9af1c36a93
commit 8b150ce419

View file

@ -57,6 +57,7 @@ def register_events(path_or_typeclass):
try:
storage = ScriptDB.objects.get(db_key="event_handler")
assert storage.is_active
assert storage.ndb.events is not None
except (ScriptDB.DoesNotExist, AssertionError):
storage = EVENTS