Fix doc build issue from early container load

This commit is contained in:
Griatch 2022-10-23 10:40:12 +02:00
parent 70bceed8c1
commit 66e03d4a59

View file

@ -201,9 +201,11 @@ class GlobalScriptContainer(Container):
initialized.
"""
global _BASE_SCRIPT_TYPECLASS
if not _BASE_SCRIPT_TYPECLASS:
_BASE_SCRIPT_TYPECLASS = class_from_module(settings.BASE_SCRIPT_TYPECLASS)
if self.loaded_data:
# we don't always load this, it collides with doc generation
global _BASE_SCRIPT_TYPECLASS
if not _BASE_SCRIPT_TYPECLASS:
_BASE_SCRIPT_TYPECLASS = class_from_module(settings.BASE_SCRIPT_TYPECLASS)
if self.typeclass_storage is None:
self.typeclass_storage = {}