Permalink
Browse files

fix dashboard error with missing scandata

  • Loading branch information...
1 parent c0c0525 commit 42c1f599016f194247c17d3250c9f5accec3955c @maurodoglio maurodoglio committed Aug 29, 2013
Showing with 4 additions and 2 deletions.
  1. +4 −2 spade/model/models.py
View
@@ -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:
@@ -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:

0 comments on commit 42c1f59

Please sign in to comment.