Add missing call to super in JSONType.__init__

Fixes https://github.com/kvesteri/sqlalchemy-utils/issues/57.
This commit is contained in:
Tarjei Husøy
2014-01-09 22:13:57 +01:00
parent c071536bb9
commit 41a5c68d3e

View File

@@ -54,11 +54,12 @@ class JSONType(sa.types.TypeDecorator):
"""
impl = sa.UnicodeText
def __init__(self):
def __init__(self, *args, **kwargs):
if json is None:
raise ImproperlyConfigured(
'JSONType needs anyjson package installed.'
)
super(JSONType, self).__init__(*args, **kwargs)
def load_dialect_impl(self, dialect):
if dialect.name == 'postgresql':