mirror of
				https://github.com/janeczku/calibre-web
				synced 2025-10-30 23:03:02 +00:00 
			
		
		
		
	Handle None as identifier value during upload
This commit is contained in:
		
							
								
								
									
										10
									
								
								cps/epub.py
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								cps/epub.py
									
									
									
									
									
								
							| @@ -102,11 +102,11 @@ def get_epub_info(tmp_file_path, original_file_name, original_file_extension): | |||||||
|  |  | ||||||
|     identifiers = [] |     identifiers = [] | ||||||
|     for node in p.xpath('dc:identifier', namespaces=ns): |     for node in p.xpath('dc:identifier', namespaces=ns): | ||||||
|         identifier_name=node.attrib.values()[-1]; |         identifier_name = node.attrib.values()[-1] | ||||||
|         identifier_value=node.text; |         identifier_value = node.text | ||||||
|         if identifier_name in ('uuid','calibre'): |         if identifier_name in ('uuid', 'calibre') or identifier_value is None: | ||||||
|             continue; |             continue | ||||||
|         identifiers.append( [identifier_name, identifier_value] ) |         identifiers.append([identifier_name, identifier_value]) | ||||||
|  |  | ||||||
|     if not epub_metadata['title']: |     if not epub_metadata['title']: | ||||||
|         title = original_file_name |         title = original_file_name | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Ozzie Isaacs
					Ozzie Isaacs