--- a/src/pyams_alchemy/mixin.py Sat Jan 27 00:38:58 2018 +0100
+++ b/src/pyams_alchemy/mixin.py Thu Feb 08 08:51:30 2018 +0100
@@ -18,9 +18,8 @@
# import interfaces
# import packages
-from pyramid.threadlocal import get_current_registry
+from pyams_utils.registry import get_global_registry
from sqlalchemy.ext.declarative import declared_attr
-from zope.component.globalregistry import getGlobalSiteManager
class DynamicSchemaMixin(object):
@@ -39,7 +38,7 @@
def get_schema(cls):
settings_name = cls.get_schema_settings_name()
if settings_name:
- registry = get_current_registry() or getGlobalSiteManager()
+ registry = get_global_registry()
return {'schema': registry.settings.get(settings_name, cls.__schema__)}
else:
return {'schema': cls.__schema__}