#34113: Sitemap: max() arg is an empty sequence
----------------------------------------------+------------------------
               Reporter:  Mikhail Mitrofanov  |          Owner:  nobody
                   Type:  Bug                 |         Status:  new
              Component:  contrib.sitemaps    |        Version:  4.1
               Severity:  Normal              |       Keywords:
           Triage Stage:  Unreviewed          |      Has patch:  0
    Needs documentation:  0                   |    Needs tests:  0
Patch needs improvement:  0                   |  Easy pickings:  0
                  UI/UX:  0                   |
----------------------------------------------+------------------------
 With empty items sequence Sitemap raise ValueError: max() arg is an empty
 sequence

 Sitemap example:

 {{{
 class RealtyPropertySitemap(Sitemap):
     changefreq = "monthly"

     def items(self):
         return Property.objects.filter(is_active=True).only("pk", "slug",
 "lastmodified").order_by("pk")

     def lastmod(self, obj: Property):
         return obj.lastmodified
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34113>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018409290794-a0f1e319-e584-47c2-893e-40e0622f92a3-000000%40eu-central-1.amazonses.com.

Reply via email to