[dataimport, migration] more fixes in the spirit of a6c32edabc8d:
[entity, metadata] huuum, use resolvable url as cwuri... And fix existing ones.
Closes #3390388
--- a/dataimport.py Thu Feb 06 15:04:57 2014 +0100
+++ b/dataimport.py Thu Feb 13 15:09:30 2014 +0100
@@ -873,7 +873,7 @@
return getattr(self, 'gen_%s' % rtype)(entity)
def gen_cwuri(self, entity):
- return u'%seid/%s' % (self.baseurl, entity.eid)
+ return u'%s%s' % (self.baseurl, entity.eid)
def gen_creation_date(self, entity):
return self.time
--- a/misc/migration/bootstrapmigration_repository.py Thu Feb 06 15:04:57 2014 +0100
+++ b/misc/migration/bootstrapmigration_repository.py Thu Feb 13 15:09:30 2014 +0100
@@ -157,7 +157,7 @@
type, source, extid = session.describe(eid)
if source == 'system':
rql('SET X cwuri %(u)s WHERE X eid %(x)s',
- {'x': eid, 'u': base_url + u'eid/%s' % eid})
+ {'x': eid, 'u': u'%s%s' % (base_url, eid)})
isession.commit()
session.set_shared_data('do-not-insert-cwuri', False)