equal
deleted
inserted
replaced
780 for attr, values in kwargs.iteritems(): |
780 for attr, values in kwargs.iteritems(): |
781 if attr.startswith('reverse_'): |
781 if attr.startswith('reverse_'): |
782 restr = 'Y %s X' % attr[len('reverse_'):] |
782 restr = 'Y %s X' % attr[len('reverse_'):] |
783 else: |
783 else: |
784 restr = 'X %s Y' % attr |
784 restr = 'X %s Y' % attr |
|
785 if not isinstance(values, (tuple, list, set, frozenset)): |
|
786 values = (values,) |
785 execute('SET %s WHERE X eid %%(x)s, Y eid IN (%s)' % ( |
787 execute('SET %s WHERE X eid %%(x)s, Y eid IN (%s)' % ( |
786 restr, ','.join(str(r.eid) for r in values)), |
788 restr, ','.join(str(r.eid) for r in values)), |
787 {'x': self.eid}, 'x') |
789 {'x': self.eid}, 'x') |
788 |
790 |
789 def delete(self): |
791 def delete(self): |