Fix place hierarchy creation during import
This commit is contained in:
parent
e0c6468c77
commit
33b9e80028
@ -96,7 +96,7 @@ class PlaceImport(object):
|
|||||||
if parent:
|
if parent:
|
||||||
place = self.db.get_place_from_handle(handle)
|
place = self.db.get_place_from_handle(handle)
|
||||||
placeref = PlaceRef()
|
placeref = PlaceRef()
|
||||||
placeref.ref = parent.decode('utf-8')
|
placeref.ref = parent
|
||||||
place.set_placeref_list([placeref])
|
place.set_placeref_list([placeref])
|
||||||
self.db.commit_place(place, trans, place.get_change_time())
|
self.db.commit_place(place, trans, place.get_change_time())
|
||||||
|
|
||||||
@ -112,7 +112,7 @@ class PlaceImport(object):
|
|||||||
place.place_type = PlaceType(7-type_num)
|
place.place_type = PlaceType(7-type_num)
|
||||||
if parent is not None:
|
if parent is not None:
|
||||||
placeref = PlaceRef()
|
placeref = PlaceRef()
|
||||||
placeref.ref = parent.decode('utf-8')
|
placeref.ref = parent
|
||||||
place.set_placeref_list([placeref])
|
place.set_placeref_list([placeref])
|
||||||
handle = self.db.add_place(place, trans)
|
handle = self.db.add_place(place, trans)
|
||||||
self.db.commit_place(place, trans)
|
self.db.commit_place(place, trans)
|
||||||
|
Loading…
Reference in New Issue
Block a user