mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-03 22:55:43 +00:00 
			
		
		
		
	fix possible access to None value
This commit is contained in:
		@@ -84,6 +84,9 @@ def getNewestMigrationFile(app, exclude_extension=True):
 | 
				
			|||||||
            newest_num = num
 | 
					            newest_num = num
 | 
				
			||||||
            newest_file = f
 | 
					            newest_file = f
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if not newest_file:  # pragma: no cover
 | 
				
			||||||
 | 
					        return newest_file
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if exclude_extension:
 | 
					    if exclude_extension:
 | 
				
			||||||
        newest_file = newest_file.replace('.py', '')
 | 
					        newest_file = newest_file.replace('.py', '')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user