From 071a1830985834efc113f63fa8740c7306e0cae3 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 13 Jul 2014 18:55:18 -0400 Subject: - 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 --- lib/sqlalchemy/dialects/postgresql/base.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/sqlalchemy/dialects/postgresql/base.py') 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): -- cgit v1.2.1