Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[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...
commit 17e632929cdf9575f538c1f98379adac8698c288 1 parent e82846a
shaib authored July 30, 2013

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/db/backends/oracle/base.py
2  django/db/backends/oracle/base.py
@@ -576,7 +576,7 @@ def init_connection_state(self):
576 576
                 cursor.execute("SELECT 1 FROM DUAL WHERE DUMMY %s"
577 577
                                % self._standard_operators['contains'],
578 578
                                ['X'])
579  
-            except utils.DatabaseError:
  579
+            except DatabaseError: 
580 580
                 self.operators = self._likec_operators
581 581
             else:
582 582
                 self.operators = self._standard_operators

0 notes on commit 17e6329

Please sign in to comment.
Something went wrong with that request. Please try again.