CatalogDict: institution and URL can be None
This commit is contained in:
		
							parent
							
								
									f33f4b6394
								
							
						
					
					
						commit
						ae0b2e5a51
					
				| 
						 | 
				
			
			@ -28,8 +28,8 @@ class Entity(TypedDict, total=False):
 | 
			
		|||
class CatalogDict(TypedDict, total=False):
 | 
			
		||||
    """Catalog record from institution web site."""
 | 
			
		||||
 | 
			
		||||
    institution: str
 | 
			
		||||
    url: str
 | 
			
		||||
    institution: str | None
 | 
			
		||||
    url: str | None
 | 
			
		||||
    ids: set[str]
 | 
			
		||||
    detail: list[dict[str, str]]
 | 
			
		||||
    description: str
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -399,7 +399,6 @@ def get_catalog_from_artwork(entity: Entity) -> CatalogDict:
 | 
			
		|||
        catalog_detail.append(detail)
 | 
			
		||||
 | 
			
		||||
    url = wikibase.first_datavalue(entity, "P973")
 | 
			
		||||
    assert isinstance(url, str)
 | 
			
		||||
    catalog: CatalogDict = {
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "detail": catalog_detail,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue