equal
deleted
inserted
replaced
767 etype = elements[0] |
767 etype = elements[0] |
768 rtypes = elements[1:] |
768 rtypes = elements[1:] |
769 raise UniqueTogetherError(etype, rtypes) |
769 raise UniqueTogetherError(etype, rtypes) |
770 # sqlite |
770 # sqlite |
771 mo = re.search('columns (.*) are not unique', arg) |
771 mo = re.search('columns (.*) are not unique', arg) |
|
772 if mo is None: |
|
773 # sqlite > 3.7 |
|
774 mo = re.search('UNIQUE constraint failed: (.*)', arg) |
772 if mo is not None: # sqlite in use |
775 if mo is not None: # sqlite in use |
773 # we left chop the 'cw_' prefix of attribute names |
776 # we left chop the 'cw_' prefix of attribute names |
774 rtypes = [c.strip()[3:] |
777 rtypes = [c.strip()[3:] |
775 for c in mo.group(1).split(',')] |
778 for c in mo.group(1).split(',')] |
776 etype = '???' |
779 etype = '???' |