From b6fbf3e8e56b34fdc4367d582bbcb036e4aa2972 Mon Sep 17 00:00:00 2001 From: Pavlo Kapyshin Date: Fri, 24 Feb 2017 16:46:31 +0200 Subject: Fixed #27879 -- Fixed crash if enclosures aren't provided to Atom1Feed.add_item(). Regression in 75cf9b5ac031feb8f94271c9906157c921a14520 --- django/utils/feedgenerator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'django') diff --git a/django/utils/feedgenerator.py b/django/utils/feedgenerator.py index 9dec126941..fa5c1f03ba 100644 --- a/django/utils/feedgenerator.py +++ b/django/utils/feedgenerator.py @@ -137,7 +137,7 @@ class SyndicationFeed: 'comments': to_str(comments), 'unique_id': to_str(unique_id), 'unique_id_is_permalink': unique_id_is_permalink, - 'enclosures': enclosures, + 'enclosures': enclosures or (), 'categories': categories or (), 'item_copyright': to_str(item_copyright), 'ttl': ttl, -- cgit v1.3