mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Fixed #27879 -- Fixed crash if enclosures aren't provided to Atom1Feed.add_item().
Regression in 75cf9b5ac0
			
			
This commit is contained in:
		
				
					committed by
					
						 Tim Graham
						Tim Graham
					
				
			
			
				
	
			
			
			
						parent
						
							508b5debfb
						
					
				
				
					commit
					b6fbf3e8e5
				
			
							
								
								
									
										1
									
								
								AUTHORS
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								AUTHORS
									
									
									
									
									
								
							| @@ -612,6 +612,7 @@ answer newbie questions, and generally made Django that much better: | ||||
|     Paulo Scardine <paulo@scardine.com.br> | ||||
|     Paul Smith <blinkylights23@gmail.com> | ||||
|     pavithran s <pavithran.s@gmail.com> | ||||
|     Pavlo Kapyshin <i@93z.org> | ||||
|     permonik@mesias.brnonet.cz | ||||
|     Petar Marić <http://www.petarmaric.com/> | ||||
|     Pete Crosier <pete.crosier@gmail.com> | ||||
|   | ||||
| @@ -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, | ||||
|   | ||||
| @@ -120,6 +120,12 @@ class FeedgeneratorTest(unittest.TestCase): | ||||
|         self.assertIn('href="/feed/"', 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): | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user