server/sources/native.py
changeset 6279 42079f752a9c
parent 6225 a176e68b7d0d
parent 6247 f7cb092d2296
child 6333 e3994fcc21c3
--- a/server/sources/native.py	Tue Sep 14 08:48:44 2010 +0200
+++ b/server/sources/native.py	Thu Sep 16 18:56: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