From e3f910f732daaa89792a6cb1736aea079eb315e2 Mon Sep 17 00:00:00 2001 From: BeritJanssen Date: Wed, 11 Sep 2024 14:21:44 +0200 Subject: [PATCH] fix: correct variable name api_key -> data_api_key --- backend/corpora/jewishmigration/jewishmigration.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/corpora/jewishmigration/jewishmigration.py b/backend/corpora/jewishmigration/jewishmigration.py index e486d0dac..16b0ee00a 100644 --- a/backend/corpora/jewishmigration/jewishmigration.py +++ b/backend/corpora/jewishmigration/jewishmigration.py @@ -63,7 +63,7 @@ class JewishMigration(PeacePortal, JSONCorpusDefinition): def sources(self, start, end): if self.data_url: if self.data_api_key: - headers = {'Authorization': f'Token {self.api_key}'} + headers = {"Authorization": f"Token {self.data_api_key}"} response = requests.get(self.data_url, headers=headers) else: response = requests.get(self.data_url) @@ -77,7 +77,6 @@ def sources(self, start, end): for source in list_of_sources: yield source - def __init__(self): super().__init__() self._id.extractor = extract.JSON(key='source')