Skip to content

Commit

Permalink
Fixed query to only feature latest version of article
Browse files Browse the repository at this point in the history
  • Loading branch information
eidens committed Jun 15, 2023
1 parent 6b4e4cc commit 143080e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion neoflask/queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,13 @@ class REFEREED_PREPRINTS(Query):
MATCH (revservice)-[:HasPaper]->(vizpaper:VizPaper)
WITH vizpaper.doi AS doi
MATCH (a:Article {doi: doi})
WITH a
WHERE
(
toLower(apoc.convert.toString(a.published_journal_title)) = toLower($published_in)
) OR ($published_in = '')
WITH a
ORDER BY a.version DESC
WITH a.doi AS doi, COLLECT(a)[0] AS a
WITH DISTINCT
id(a) AS id,
a.publication_date AS pub_date,
Expand Down

0 comments on commit 143080e

Please sign in to comment.