server/sources/native.py
branchstable
changeset 6247 f7cb092d2296
parent 6211 e9d125fd1465
child 6279 42079f752a9c
child 6297 23c1e50ff97b
--- a/server/sources/native.py	Wed Sep 15 15:00:04 2010 +0200
+++ b/server/sources/native.py	Wed Sep 15 15:14:35 2010 +0200
@@ -677,6 +677,11 @@
                         etype = elements[0]
                         rtypes = elements[1:]                        
                         raise UniqueTogetherError(etype, rtypes)
+                    mo = re.search('columns (.*) are not unique', arg)
+                    if mo is not None: # sqlite in use
+                        rtypes = [c.strip().lstrip('cw_') for c in mo.group(1).split(',')]
+                        etype = '???'
+                        raise UniqueTogetherError(etype, rtypes)
             raise
         return cursor