merge dump listings and dump details commands - fetch both details and listings in the same command
This commit is contained in:
parent
29213f3d26
commit
842f7cefbe
7 changed files with 54 additions and 59 deletions
|
|
@ -37,7 +37,7 @@ class Listing:
|
|||
|
||||
@staticmethod
|
||||
def get_all_listings(
|
||||
listing_paths: list[str],
|
||||
listing_paths: list[pathlib.Path],
|
||||
seen_in_the_last_n_days: int = 30,
|
||||
) -> List["Listing"]:
|
||||
identifiers = []
|
||||
|
|
@ -256,8 +256,11 @@ class Listing:
|
|||
@property
|
||||
def detailobject(self) -> dict[str, Any]:
|
||||
if self._cached is None:
|
||||
with open(self.path_detail_json()) as f:
|
||||
self._cached = json.load(f)
|
||||
if self.path_detail_json().exists():
|
||||
with open(self.path_detail_json()) as f:
|
||||
self._cached = json.load(f)
|
||||
else:
|
||||
return {}
|
||||
return self._cached # type: ignore
|
||||
|
||||
@property
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue