most_viewed() template-filter search all Submission objects based on pk stored in PageHit objects. An exception is raised when the Submission object is not present in database but PageHit consists of its pk values.
PageHit model logs all data. So, the exceptions are ignored instead of deleting respective PageHit objects.
most_viewed()
template-filter search allSubmission
objects based onpk
stored inPageHit
objects. An exception is raised when theSubmission
object is not present in database butPageHit
consists of itspk
values.PageHit
model logs all data. So, the exceptions are ignored instead of deleting respectivePageHit
objects.