Skip to content

Commit

Permalink
Merge pull request #386 from gi0baro/issue383
Browse files Browse the repository at this point in the history
Fix #383
  • Loading branch information
gi0baro committed Jun 28, 2016
2 parents 8332c39 + fcd683c commit a48b8c9
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 a48b8c9

Please sign in to comment.