dbee wrote:

>When the reminders_list in the 'if' statement below gets assigned,
>there doesn't seem to be a problem. But when I reference it at the
>bottom of the code segment. I end up with the programming error at the
>bottom of the page.
>  
>
Do you know which line triggers the error ? It's not clear from your 
description.

>            if campaign.groups.all() > 0 :
>  
>
This line looks wrong.  all() returns a queryset, not a number.
Perhaps you want
if campaign.groups.count() > 0:

>                # Each campaign has groups and each group has reminder
>profiles
>                reminders_list =
>Reminders.objects.filter(campaigns__groups__id__in=[g.id for g in
>campaign.groups.all()])
>  
>
Perhaps the error in the if statement means that this line gets executed 
even when campaign.groups.count() is zero (because your if statement is 
wrong) ? That looks like it could explain the error you're seeing.

Chris


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to