misc/migration/bootstrapmigration_repository.py
changeset 2696 b45d852990d5
parent 2578 b717ebef04d8
child 2892 7ae3d62a8328
child 2955 6bb5025c9fc7
--- a/misc/migration/bootstrapmigration_repository.py	Wed Aug 05 17:22:33 2009 +0200
+++ b/misc/migration/bootstrapmigration_repository.py	Wed Aug 05 17:23:06 2009 +0200
@@ -21,11 +21,10 @@
     # use an internal session since some entity might forbid modifications to admin
     isession = repo.internal_session()
     for eid, in rql('Any X', ask_confirm=False):
-        try:
+        type, source, extid = session.describe(eid)
+        if source == 'system':
             isession.execute('SET X cwuri %(u)s WHERE X eid %(x)s',
                              {'x': eid, 'u': base_url + u'eid/%s' % eid})
-        except RepositoryError:
-            print 'unable to set cwuri for', eid, session.describe(eid)
     isession.commit()
     repo.hm.register_hook(uniquecstrcheck_before_modification, 'before_add_entity', '')
     repo.hm.register_hook(uniquecstrcheck_before_modification, 'before_update_entity', '')