Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vincerubinetti committed May 30, 2024
1 parent 479b348 commit b703f00
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions _cite/plugins/orcid.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def query(_id):
ids = ids + get_safe(summary, "external-ids.external-id", [])
ids = ids + get_safe(work, "external-ids.external-id", [])

# prefer particular "relationship" type, or fallback to first id
# find first id of particular "relationship" type
_id = next(
(
id
Expand All @@ -67,15 +67,6 @@ def query(_id):
# get summaries
summaries = get_safe(work, "work-summary", [])

# sort summary entries by most recent
summaries = sorted(
summaries,
key=lambda summary: (get_safe(summary, "last-modified-date.value", 0))
or get_safe(summary, "created-date.value", 0)
or 0,
reverse=True,
)

# get first summary with defined sub-value
def first(get_func):
return next(
Expand Down

0 comments on commit b703f00

Please sign in to comment.