Changes between Initial Version and Version 1 of Ticket #36775
- Timestamp:
- Dec 4, 2025, 2:07:47 PM (26 minutes ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #36775
- Property Needs tests set
- Property Owner set to
- Property Triage Stage Unreviewed → Accepted
- Property Status new → assigned
- Property Type Bug → Cleanup/optimization
-
Ticket #36775 – Description
initial v1 1 1 Currently, the `Feed.get_feed()` method retrieves the feed's `link` using: 2 2 {{{#!py 3 3 link = self._get_dynamic_attr("link", obj) 4 4 }}} 5 5 If a Feed subclass does not define a `link` attribute, `link` becomes `None`. 6 6 This results in an unhelpful exception when Django later calls: 7 7 {{{#!py 8 8 link = add_domain(current_site.domain, link, request.is_secure()) 9 9 }}} 10 10 Since `add_domain()` calls `url.startswith()`, a missing `link` 11 11 causes: 12 12 {{{#!py 13 13 AttributeError: 'NoneType' object has no attribute 'startswith' 14 14 }}} 15 15 This error does not clearly indicate the actual problem. 16 16 … … 20 20 21 21 The attached PR adds the following check: 22 22 {{{#!py 23 23 if link is None: 24 24 raise ImproperlyConfigured( 25 25 "Feed class must define a 'link' attribute." 26 26 ) 27 27 }}} 28 28 This results in a clearer error message and avoids unexpected crashes. 29 29