mirror of
				https://github.com/qurator-spk/modstool.git
				synced 2025-11-04 03:14:14 +01:00 
			
		
		
		
	✨ Force singleton for shelfLocator
Very few input sources contain multiple mods:shelfLocator elements for a mods:Location (illegal according to DFG MODS Anwendungsprofil). Force a singleton in this case. Fixes gh-7.
This commit is contained in:
		
							parent
							
								
									d35032067a
								
							
						
					
					
						commit
						db79960ba1
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -233,7 +233,7 @@ def mods_to_dict(mods, raise_errors=True):
 | 
				
			||||||
                return shelf_locator.get('displayLabel') is None
 | 
					                return shelf_locator.get('displayLabel') is None
 | 
				
			||||||
            value['shelfLocator'] = TagGroup(tag, group) \
 | 
					            value['shelfLocator'] = TagGroup(tag, group) \
 | 
				
			||||||
                .filter(no_display_label) \
 | 
					                .filter(no_display_label) \
 | 
				
			||||||
                .is_singleton() \
 | 
					                .force_singleton() \
 | 
				
			||||||
                .has_no_attributes() \
 | 
					                .has_no_attributes() \
 | 
				
			||||||
                .text()
 | 
					                .text()
 | 
				
			||||||
        elif tag == '{http://www.loc.gov/mods/v3}originInfo':
 | 
					        elif tag == '{http://www.loc.gov/mods/v3}originInfo':
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue