Commits

Joe Judge  committed a1641ad

fix photo counts

  • Participants
  • Parent commits ecb488e

Comments (0)

Files changed (2)

File syncr/flickr/models.py

 	'Photo', related_name='primary_in', null=True)
 
     def numPhotos(self):
-        return len(self.photo_list.objects.all())
+        return self.photos.count()
 
     def __unicode__(self):
         return u"%s's favorite photos" % self.owner

File syncr/picasaweb/models.py

     updated = models.DateTimeField()
 
     def numPhotos(self):
-        return len(self.photo_list.objects.all())
+        return self.photos.count()
 
     def __unicode__(self):
         return u"%s's favorite photos" % self.owner
     access = models.CharField(max_length=10, choices=PICASAWEB_ACCESS)
 
     def numPhotos(self):
-        return len(self.photos.objects.all())
+        return self.photos.count()
 
     def __unicode__(self):
         return u"%s photo set by %s" % (self.title, self.owner)