Merge branch 'master' of github.com:kvesteri/sqlalchemy-utils
This commit is contained in:
@@ -46,6 +46,7 @@ from .types import (
|
||||
ScalarListException,
|
||||
TimezoneType,
|
||||
TSVectorType,
|
||||
URLType,
|
||||
UUIDType,
|
||||
)
|
||||
|
||||
@@ -100,6 +101,7 @@ __all__ = (
|
||||
ScalarListType,
|
||||
TimezoneType,
|
||||
TSVectorType,
|
||||
URLType,
|
||||
UUIDType,
|
||||
database_exists,
|
||||
create_database,
|
||||
|
@@ -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':
|
||||
|
Reference in New Issue
Block a user