Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Commit

Permalink
Change from date to date_from and date_to
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood committed Mar 11, 2024
1 parent 0cacbcf commit d423ec9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion app/records/schemas/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
class RecordSearchResult(APISearchResult):
type: str = ""
ref: str | None = None
date: str | None = None
date_from: str | None = None
date_to: str | None = None
held_by: dict | None = None

def __str__(self):
Expand Down
7 changes: 4 additions & 3 deletions app/sources/rosetta/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ def parse_results(
record.ref = parsed_data.reference_number()
record.title = parsed_data.title()
record.description = parsed_data.description()
record.date = parsed_data.date()
record.date_from = parsed_data.date_from()
record.date_to = parsed_data.date_to()
record.held_by = parsed_data.held_by()
# if highlight and "highLight" in r:
# if "@template.details.summaryTitle" in r["highLight"]:
Expand Down Expand Up @@ -123,9 +124,9 @@ def get_result(self) -> dict:
for group in stats:
self.add_parameter("filter", f"group:({group})")
url = self.build_url()
print(url)
# print(url)
raw_results = self.execute(url)
print(url)
# print(url)
results_count = objects.get(raw_results, "stats.total")
stats[group] = results_count
return stats
Expand Down

0 comments on commit d423ec9

Please sign in to comment.