# HG changeset patch # User Thierry Florac # Date 1521726833 -3600 # Node ID 450c0327037ee8feda9e1bdded051a5ac4efb064 # Parent de21f1dcf22a2485cffa5bb3e5a3998a68131b3d Added check of registry settings in dynamic schema mixin class diff -r de21f1dcf22a -r 450c0327037e src/pyams_alchemy/mixin.py --- a/src/pyams_alchemy/mixin.py Tue Mar 20 17:40:45 2018 +0100 +++ b/src/pyams_alchemy/mixin.py Thu Mar 22 14:53:53 2018 +0100 @@ -39,9 +39,9 @@ settings_name = cls.get_schema_settings_name() if settings_name: registry = get_global_registry() - return {'schema': registry.settings.get(settings_name, cls.__schema__)} - else: - return {'schema': cls.__schema__} + if hasattr(registry, 'settings'): + return {'schema': registry.settings.get(settings_name, cls.__schema__)} + return {'schema': cls.__schema__} @declared_attr def __table_args__(cls):