Skip to content

Commit

Permalink
Fix #383
Browse files Browse the repository at this point in the history
  • Loading branch information
gi0baro committed Jun 28, 2016
1 parent 8332c39 commit fcd683c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pydal/adapters/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ def _config_json(self):
self.connection.server_version >= 90200
if use_json:
self.dialect = self._get_json_dialect()(self)
if self.driver.__version__ >= '2.5.0':
self.parser = self._get_json_parser()(self)
if self.driver.__version__ >= '2.5.0':
self.parser = self._get_json_parser()(self)

def adapt(self, obj):
adapted = psycopg2_adapt(obj)
Expand All @@ -170,8 +170,8 @@ class PostgrePG8000(Postgre):
def _config_json(self):
if self.connection._server_version >= "9.2.0":
self.dialect = self._get_json_dialect()(self)
if self.driver.__version__ >= '1.10.2':
self.parser = self._get_json_parser()(self)
if self.driver.__version__ >= '1.10.2':
self.parser = self._get_json_parser()(self)

def adapt(self, obj):
return "'%s'" % obj.replace("%", "%%").replace("'", "''")
Expand Down

0 comments on commit fcd683c

Please sign in to comment.