[migration/3.21] fix stupid error in migration script
authorJulien Cristau <julien.cristau@logilab.fr>
Mon, 20 Jul 2015 16:43:47 +0200
changeset 10538 a2d2383612f3
parent 10537 346b94e3ea0a
child 10539 08c5d26417f6
[migration/3.21] fix stupid error in migration script str.join doesn't like a list of ints. Closes #5706359.
misc/migration/3.21.0_Any.py
--- a/misc/migration/3.21.0_Any.py	Wed Jul 15 15:01:21 2015 +0200
+++ b/misc/migration/3.21.0_Any.py	Mon Jul 20 16:43:47 2015 +0200
@@ -50,13 +50,13 @@
             broken_eids = sql('SELECT cw_eid FROM cw_%(e)s WHERE cw_%(r)s IS NULL' % args, ask_confirm=False)
             if broken_eids:
                 print 'Required relation %(e)s.%(r)s missing' % args
-                args['eids'] = ', '.join(eid for eid, in broken_eids)
+                args['eids'] = ', '.join(str(eid) for eid, in broken_eids)
                 rql('DELETE %(e)s X WHERE X eid IN (%(eids)s)' % args)
             broken_eids = sql('SELECT cw_eid FROM cw_%(e)s WHERE cw_%(r)s IN (SELECT cw_%(r)s FROM cw_%(e)s '
                               'EXCEPT SELECT eid FROM entities)' % args, ask_confirm=False)
             if broken_eids:
                 print 'Required relation %(e)s.%(r)s references unknown objects, deleting subject entities' % args
-                args['eids'] = ', '.join(eid for eid, in broken_eids)
+                args['eids'] = ', '.join(str(eid) for eid, in broken_eids)
                 rql('DELETE %(e)s X WHERE X eid IN (%(eids)s)' % args)
         else:
             if sql('SELECT COUNT(*) FROM ('