Skip to content

Commit

Permalink
citation count converter fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanhb committed Jul 10, 2024
1 parent 63f6362 commit ce5d40a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/citation_count_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,9 @@ def main():
logger.info("Get citations form Redis for: "+str(anyid_pref+":"+any_id)+ " (omid:"+omid+")" )
__b_cits = redis_cits.get(omid.replace("br/",""))
citing_omids = json.loads(__b_cits.decode('utf-8'))
citing_anyid = set( [omid_map["br/"+__c] for __c in citing_omids] )
cits_count = len(set(citing_anyid))
citing_anyid = set( [omid_map["br/"+__c] for __c in citing_omids if "br/"+__c in omid_map] )
citing_not_anyid = set( ["br/"+__c for __c in citing_omids if "br/"+__c not in omid_map] )
cits_count = len(set(citing_anyid)) + len(set(citing_not_anyid))

else:
logger.info("Get citations via API for: "+str(anyid_pref+":"+any_id))
Expand Down

0 comments on commit ce5d40a

Please sign in to comment.