fixe un bug sur le calcul du coût si brouillon sans profil

This commit is contained in:
Thomas NOËL 2012-07-20 11:21:36 +02:00
parent 4f9a2d8a5e
commit 106700c99a
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ class RequestQueryset(utils.QuerySet):
.only('nb_pages', 'copies', 'base_profile__ppp',
'base_profile__ppd', 'choices__ppp', 'choices__ppd')
total_cost = zero
for r in qs:
for r in [ r for r in qs if r.base_profile and (r.copies > 0) ]:
ppp = r.base_profile.ppp
ppd = r.base_profile.ppd
for c in r.choices.all():