Skip to content

Commit

Permalink
Update notice_fetcher.py
Browse files Browse the repository at this point in the history
  • Loading branch information
CaptainOfHacks committed Feb 23, 2024
1 parent 54594bc commit a75ce33
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ted_sws/notice_fetcher/services/notice_fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,14 @@ def fetch_notices_by_query(self, query: dict) -> List[str]:
:param query:
:return:
"""
documents = self.ted_api_adapter.get_by_query(query=query)
return self._store_to_notice_repository(documents=documents)
#documents = self.ted_api_adapter.get_by_query(query=query)
documents = self.ted_api_adapter.get_by_query_generator(query=query)
notice_ids = set()
for document in documents:
notice_ids.add(document["ND"])
self.notice_repository.add(notice=self._create_notice(notice_data=document))
#return self._store_to_notice_repository(documents=documents)
return list(notice_ids)

def fetch_notices_by_date_range(self, start_date: date, end_date: date) -> List[str]:
"""
Expand Down

0 comments on commit a75ce33

Please sign in to comment.