svn: r19857
This commit is contained in:
Doug Blank 2012-06-17 19:00:40 +00:00
parent 7a5348de8a
commit 3b9a696f90

View File

@ -639,18 +639,11 @@ class DbDjango(DbWriteBase, DbReadBase):
def get_place_from_handle(self, handle): def get_place_from_handle(self, handle):
if handle in self.import_cache: if handle in self.import_cache:
return self.import_cache[handle] return self.import_cache[handle]
# FIXME: use object cache
try: try:
dji_obj = self.dji.Place.get(handle=handle) place = self.dji.Place.get(handle=handle)
except: except:
dji_obj = None return None
if dji_obj: return self.make_place(place)
tuple_obj = self.dji.get_place(dji_obj)
if tuple_obj:
obj = gen.lib.Place()
obj.unserialize(tuple_obj)
return obj
return None
def get_citation_from_handle(self, handle): def get_citation_from_handle(self, handle):
if handle in self.import_cache: if handle in self.import_cache: