I have a queryset that returns all the expired licenses objects as shown 
below.

*qs = 
LicenseIssue.objects.filter(expiry_date__lte=TODAY).order_by('-expiry_date')*
    

Here is my situation:
There exists multiple issued licenses of different businesses for year 2020 
and their  previous issued licenses for the for year 2019, 2018 and so on. 
The above queryset results to listing all expired licenses though I'd like 
to make it possible if there exists issued licenses for year 2020 their 
previous issued licenses should not appear in the expired licenses 
queryset. Please advise on this.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7d5ed088-c21b-4bd3-aba3-0f61c05efa50n%40googlegroups.com.

Reply via email to