After the patch for loop, some missing references

Fixes #010168
This commit is contained in:
SNoiraud 2017-08-23 11:59:41 +02:00
parent 50b4c62d5e
commit f4dc2a1ff5

View File

@ -835,6 +835,8 @@ class NavWebReport(Report):
@param: bkref_handle -- The handle associated to this source
"""
if len(self.obj_dict[Source][source_handle]) > 0:
for bkref in self.bkref_dict[Source][source_handle]:
if bkref_handle == bkref[1]:
return
source = self._db.get_source_from_handle(source_handle)
source_name = source.get_title()
@ -870,6 +872,8 @@ class NavWebReport(Report):
@param: bkref_handle -- The handle associated to this citation
"""
if len(self.obj_dict[Citation][citation_handle]) > 0:
for bkref in self.bkref_dict[Citation][citation_handle]:
if bkref_handle == bkref[1]:
return
citation = self._db.get_citation_from_handle(citation_handle)
# If Page is none, we want to make sure that a tuple is generated for
@ -901,6 +905,8 @@ class NavWebReport(Report):
@param: bkref_handle -- The handle associated to this media
"""
if len(self.obj_dict[Media][media_handle]) > 0:
for bkref in self.bkref_dict[Media][media_handle]:
if bkref_handle == bkref[1]:
return
media_refs = self.bkref_dict[Media].get(media_handle)
if media_refs and (bkref_class, bkref_handle) in media_refs:
@ -940,6 +946,8 @@ class NavWebReport(Report):
@param: bkref_handle -- The handle associated to this source
"""
if len(self.obj_dict[Repository][repos_handle]) > 0:
for bkref in self.bkref_dict[Repository][repos_handle]:
if bkref_handle == bkref[1]:
return
repos = self._db.get_repository_from_handle(repos_handle)
repos_name = repos.name