@@ -29,7 +29,7 @@ def affiliation_current(self) -> Optional[List[NamedTuple]]:
2929 affs = self ._json .get ('affiliation-current' )
3030 else :
3131 return None
32- return parse_affiliation (affs , self ._view )
32+ return parse_affiliation (affs or {} , self ._view )
3333
3434 @property
3535 def affiliation_history (self ) -> Optional [List [NamedTuple ]]:
@@ -44,11 +44,8 @@ def affiliation_history(self) -> Optional[List[NamedTuple]]:
4444 Note: Unlike on their website, Scopus doesn't provide the periods
4545 of affiliation.
4646 """
47- if self ._view in ('STANDARD' , 'ENHANCED' ):
48- affs = chained_get (self ._profile , ["affiliation-history" , "affiliation" ])
49- else :
50- return None
51- return parse_affiliation (affs , self ._view )
47+ affs = chained_get (self ._profile , ["affiliation-history" , "affiliation" ])
48+ return parse_affiliation (affs or {}, self ._view )
5249
5350 @property
5451 def alias (self ) -> Optional [List [str ]]:
@@ -71,8 +68,8 @@ def cited_by_count(self) -> int:
7168 def classificationgroup (self ) -> Optional [List [Tuple [int , int ]]]:
7269 """List with tuples with form`(subject group ID, number of documents)`."""
7370 path = ['classificationgroup' , 'classifications' , 'classification' ]
74- out = [(int (filter_digits (item ['$' ])), int (filter_digits (item ['@frequency' ]))) for item in
75- listify (chained_get (self ._profile , path , []))]
71+ out = [(int (filter_digits (item ['$' ])), int (filter_digits (item ['@frequency' ])))
72+ for item in listify (chained_get (self ._profile , path , []))]
7673 return out or None
7774
7875 @property
0 commit comments