Django

Code

Ticket #3760: 3760.patch

File 3760.patch, 1.1 kB (added by Collin Grady <cgrady@the-magi.us>, 2 years ago)

fixed patch format

  • django/contrib/syndication/feeds.py

    old new  
    9393 
    9494        for item in self.__get_dynamic_attr('items', obj): 
    9595            link = add_domain(current_site.domain, self.__get_dynamic_attr('item_link', item)) 
     96            unique_id = self.__get_dynamic_attr('item_guid', item) 
     97            if not unique_id: 
     98                unique_id = link 
    9699            enc = None 
    97100            enc_url = self.__get_dynamic_attr('item_enclosure_url', item) 
    98101            if enc_url: 
     
    111114                title = title_tmp.render(Context({'obj': item, 'site': current_site})).decode('utf-8'), 
    112115                link = link, 
    113116                description = description_tmp.render(Context({'obj': item, 'site': current_site})).decode('utf-8'), 
    114                 unique_id = link
     117                unique_id = unique_id
    115118                enclosure = enc, 
    116119                pubdate = self.__get_dynamic_attr('item_pubdate', item), 
    117120                author_name = author_name,