Copy the inputted new_photo_kwargs so as not to damage it.
Also I learned that pop takes a fallback.
This commit is contained in:
		
							parent
							
								
									fec5eaf21e
								
							
						
					
					
						commit
						e2cf9344c1
					
				
					 1 changed files with 3 additions and 4 deletions
				
			
		|  | @ -1093,10 +1093,9 @@ class PDBUtilMixin: | |||
|             return exclude_filenames | ||||
| 
 | ||||
|         def _normalize_new_photo_kwargs(new_photo_kwargs): | ||||
|             if 'commit' in new_photo_kwargs: | ||||
|                 new_photo_kwargs.pop('commit') | ||||
|             if 'filepath' in new_photo_kwargs: | ||||
|                 new_photo_kwargs.pop('filepath') | ||||
|             new_photo_kwargs = new_photo_kwargs.copy() | ||||
|             new_photo_kwargs.pop('commit', None) | ||||
|             new_photo_kwargs.pop('filepath', None) | ||||
|             return new_photo_kwargs | ||||
| 
 | ||||
|         def _normalize_new_photo_ratelimit(new_photo_ratelimit): | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue