From 16bdb1c09b37f95bbc5fe887e435352738864a48 Mon Sep 17 00:00:00 2001
From: George Katsikas <giorgakis.katsikas@gmail.com>
Date: Tue, 14 May 2024 14:44:04 +0300
Subject: [PATCH] strip accents from potential COI arxiv call

---
 scipost_django/conflicts/services.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scipost_django/conflicts/services.py b/scipost_django/conflicts/services.py
index 9a6239c22..a0def9fa7 100644
--- a/scipost_django/conflicts/services.py
+++ b/scipost_django/conflicts/services.py
@@ -6,7 +6,7 @@ __license__ = "AGPL v3"
 import feedparser
 import logging
 
-from profiles.models import Profile
+from common.utils.text import latinise
 
 from .models import ConflictOfInterest
 
@@ -40,8 +40,8 @@ class ArxivCaller:
         for profile in author_profiles:
             for rel_profile in relating_profiles:
                 search_query = "au:({profile}+AND+({rel_profile}))".format(
-                    profile=profile.last_name,
-                    rel_profile=rel_profile.last_name,
+                    profile=latinise(profile.last_name),
+                    rel_profile=latinise(rel_profile.last_name),
                 )
                 queryurl = self.query_base_url.format(query=search_query)
                 queryurl += "&sortBy=submittedDate&sortOrder=descending&max_results=5"
-- 
GitLab