mirror of
				https://github.com/django/django.git
				synced 2025-11-04 13:39:16 +00:00 
			
		
		
		
	Fixed #27879 -- Fixed crash if enclosures aren't provided to Atom1Feed.add_item().
Regression in 75cf9b5ac0
			
			
This commit is contained in:
		
							parent
							
								
									508b5debfb
								
							
						
					
					
						commit
						b6fbf3e8e5
					
				
					 3 changed files with 8 additions and 1 deletions
				
			
		
							
								
								
									
										1
									
								
								AUTHORS
									
										
									
									
									
								
							
							
						
						
									
										1
									
								
								AUTHORS
									
										
									
									
									
								
							| 
						 | 
					@ -612,6 +612,7 @@ answer newbie questions, and generally made Django that much better:
 | 
				
			||||||
    Paulo Scardine <paulo@scardine.com.br>
 | 
					    Paulo Scardine <paulo@scardine.com.br>
 | 
				
			||||||
    Paul Smith <blinkylights23@gmail.com>
 | 
					    Paul Smith <blinkylights23@gmail.com>
 | 
				
			||||||
    pavithran s <pavithran.s@gmail.com>
 | 
					    pavithran s <pavithran.s@gmail.com>
 | 
				
			||||||
 | 
					    Pavlo Kapyshin <i@93z.org>
 | 
				
			||||||
    permonik@mesias.brnonet.cz
 | 
					    permonik@mesias.brnonet.cz
 | 
				
			||||||
    Petar Marić <http://www.petarmaric.com/>
 | 
					    Petar Marić <http://www.petarmaric.com/>
 | 
				
			||||||
    Pete Crosier <pete.crosier@gmail.com>
 | 
					    Pete Crosier <pete.crosier@gmail.com>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -137,7 +137,7 @@ class SyndicationFeed:
 | 
				
			||||||
            'comments': to_str(comments),
 | 
					            'comments': to_str(comments),
 | 
				
			||||||
            'unique_id': to_str(unique_id),
 | 
					            'unique_id': to_str(unique_id),
 | 
				
			||||||
            'unique_id_is_permalink': unique_id_is_permalink,
 | 
					            'unique_id_is_permalink': unique_id_is_permalink,
 | 
				
			||||||
            'enclosures': enclosures,
 | 
					            'enclosures': enclosures or (),
 | 
				
			||||||
            'categories': categories or (),
 | 
					            'categories': categories or (),
 | 
				
			||||||
            'item_copyright': to_str(item_copyright),
 | 
					            'item_copyright': to_str(item_copyright),
 | 
				
			||||||
            'ttl': ttl,
 | 
					            'ttl': ttl,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -120,6 +120,12 @@ class FeedgeneratorTest(unittest.TestCase):
 | 
				
			||||||
        self.assertIn('href="/feed/"', feed_content)
 | 
					        self.assertIn('href="/feed/"', feed_content)
 | 
				
			||||||
        self.assertIn('rel="self"', feed_content)
 | 
					        self.assertIn('rel="self"', feed_content)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def test_atom_add_item(self):
 | 
				
			||||||
 | 
					        # Not providing any optional arguments to Atom1Feed.add_item()
 | 
				
			||||||
 | 
					        feed = feedgenerator.Atom1Feed('title', '/link/', 'descr')
 | 
				
			||||||
 | 
					        feed.add_item('item_title', 'item_link', 'item_description')
 | 
				
			||||||
 | 
					        feed.writeString('utf-8')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class FeedgeneratorDBTest(TestCase):
 | 
					class FeedgeneratorDBTest(TestCase):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue