diff options
| author | Shai Berger <shai@platonix.com> | 2013-07-30 03:21:06 +0300 |
|---|---|---|
| committer | Shai Berger <shai@platonix.com> | 2013-07-30 03:32:02 +0300 |
| commit | 17e632929cdf9575f538c1f98379adac8698c288 (patch) | |
| tree | 062f556ed42ea40efdb2d8fe0f04cda098657035 | |
| parent | e82846a9aa38bcc3db7e1820d11c7fa9a5f79449 (diff) | |
[1.6.x] Fixed #20785 -- Corrected exception caught for Oracle LIKE operator detection
The code that tests to see which LIKE expressions to use now runs
using non-error-wrapped cursor, so cx_Oracle exceptions need to be caught
rather than Django DatabaseErrors.
Thanks Trac user ludo for report and initial patch.
| -rw-r--r-- | django/db/backends/oracle/base.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/backends/oracle/base.py b/django/db/backends/oracle/base.py index 470ea779c3..6c510f34b5 100644 --- a/django/db/backends/oracle/base.py +++ b/django/db/backends/oracle/base.py @@ -576,7 +576,7 @@ class DatabaseWrapper(BaseDatabaseWrapper): cursor.execute("SELECT 1 FROM DUAL WHERE DUMMY %s" % self._standard_operators['contains'], ['X']) - except utils.DatabaseError: + except DatabaseError: self.operators = self._likec_operators else: self.operators = self._standard_operators |
