mirror of
				https://github.com/qurator-spk/modstool.git
				synced 2025-11-03 19:04:13 +01:00 
			
		
		
		
	🐛 Fix getting parent elements if necessary
This commit is contained in:
		
							parent
							
								
									c5332ae80d
								
							
						
					
					
						commit
						ddffb76fb6
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
					@ -323,8 +323,10 @@ def pages_to_dict(mets, raise_errors=True) -> List[Dict]:
 | 
				
			||||||
            while (cursor := cursor.getparent()).tag == f"{{{ns['mets']}}}div":
 | 
					            while (cursor := cursor.getparent()).tag == f"{{{ns['mets']}}}div":
 | 
				
			||||||
                yield cursor
 | 
					                yield cursor
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        struct_divs_to_add = set()
 | 
				
			||||||
        for struct_div in struct_divs:
 | 
					        for struct_div in struct_divs:
 | 
				
			||||||
            struct_divs.update(get_struct_log_parents(struct_div))
 | 
					            struct_divs_to_add.update(get_struct_log_parents(struct_div))
 | 
				
			||||||
 | 
					        struct_divs.update(struct_divs_to_add)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        for struct_div in struct_divs:
 | 
					        for struct_div in struct_divs:
 | 
				
			||||||
            type_ = struct_div.attrib.get("TYPE")
 | 
					            type_ = struct_div.attrib.get("TYPE")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue