Merge pull request #2693 from ChrisLR/fix-prototype-loading-xyzgrid

Fix Prototype Loading when using injected prototypes
This commit is contained in:
Griatch 2022-03-27 18:24:35 +02:00 committed by GitHub
commit 318bb98943
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -528,8 +528,10 @@ def search_prototype(
"""
# This will load the prototypes the first time they are searched
if not _MODULE_PROTOTYPE_MODULES:
loaded = getattr(load_module_prototypes, '_LOADED', False)
if not loaded:
load_module_prototypes()
setattr(load_module_prototypes, '_LOADED', True)
# prototype keys are always in lowecase
if key: