diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-07-13 18:55:18 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-07-13 18:55:18 -0400 |
commit | 071a1830985834efc113f63fa8740c7306e0cae3 (patch) | |
tree | f77bb3d124bebe9e22ad53b859ed4a56ac0d04f0 /lib/sqlalchemy/dialects/postgresql/base.py | |
parent | 6922a56140d9e014e842a60da344bf6be92f9446 (diff) | |
download | sqlalchemy-071a1830985834efc113f63fa8740c7306e0cae3.tar.gz |
- Fixed bug in :class:`.Enum` and other :class:`.SchemaType`
subclasses where direct association of the type with a
:class:`.MetaData` would lead to a hang when events
(like create events) were emitted on the :class:`.MetaData`.
fixes #3124
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/base.py')
-rw-r--r-- | lib/sqlalchemy/dialects/postgresql/base.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index 2ae71c2a7..8081f75dd 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -1100,8 +1100,7 @@ class ENUM(sqltypes.Enum): self.create(bind=bind, checkfirst=checkfirst) def _on_metadata_create(self, target, bind, checkfirst, **kw): - if self.metadata is not None and \ - not self._check_for_name_in_memos(checkfirst, kw): + if not self._check_for_name_in_memos(checkfirst, kw): self.create(bind=bind, checkfirst=checkfirst) def _on_metadata_drop(self, target, bind, checkfirst, **kw): |