Browse files

[1.6.x] Fixed #20785 -- Corrected exception caught for Oracle LIKE op…

…erator 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.
  • Loading branch information...
1 parent e82846a commit 17e632929cdf9575f538c1f98379adac8698c288 @shaib shaib committed Jul 30, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/db/backends/oracle/
@@ -576,7 +576,7 @@ def init_connection_state(self):
cursor.execute("SELECT 1 FROM DUAL WHERE DUMMY %s"
% self._standard_operators['contains'],
- except utils.DatabaseError:
+ except DatabaseError:
self.operators = self._likec_operators
self.operators = self._standard_operators

0 comments on commit 17e6329

Please sign in to comment.