Opened 2 years ago
Closed 2 years ago
#34113 closed Bug (duplicate)
max() arg is an empty sequence
Reported by: | Mikhail Mitrofanov | Owned by: | nobody |
---|---|---|---|
Component: | contrib.sitemaps | Version: | 4.1 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
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
Change History (1)
comment:1 by , 2 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Summary: | Sitemap: max() arg is an empty sequence → max() arg is an empty sequence |
Note:
See TracTickets
for help on using tickets.
Duplicate of #34088.