Skip to content
This repository has been archived by the owner on Feb 18, 2019. It is now read-only.

Commit

Permalink
fix dashboard error with missing scandata
Browse files Browse the repository at this point in the history
  • Loading branch information
maurodoglio committed Aug 29, 2013
1 parent c0c0525 commit 42c1f59
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions spade/model/models.py
Expand Up @@ -323,7 +323,8 @@ def __unicode__(self):
def css_issues_pctg(self):
total = 0
issues = 0
for sitescan in self.batch.sitescan_set.iterator():
for sitescan in self.batch.sitescan_set.filter(
sitescandata__pk__isnull=False).iterator():
data = sitescan.sitescandata
total += 1
if data.css_issues:
Expand All @@ -336,7 +337,8 @@ def css_issues_pctg(self):
def ua_issues_pctg(self):
total = 0
issues = 0
for sitescan in self.batch.sitescan_set.iterator():
for sitescan in self.batch.sitescan_set.filter(
sitescandata__pk__isnull=False).iterator():
data = sitescan.sitescandata
total += 1
if data.ua_issues:
Expand Down

0 comments on commit 42c1f59

Please sign in to comment.