File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88from enum import Enum
99import json
1010import os
11- import requests
11+ import requests # type: ignore
1212from typing import Callable , Optional , List
1313
1414from .app import Bugout
15- from .data import AuthType , BugoutSearchResultWithEntryID
15+ from .data import (
16+ AuthType ,
17+ BugoutSearchResultWithEntryID ,
18+ BugoutSearchResult ,
19+ BugoutSearchResult ,
20+ )
1621from .journal import SearchOrder
1722from .settings import BUGOUT_BROOD_URL , BUGOUT_SPIRE_URL , REQUESTS_TIMEOUT
1823
@@ -175,7 +180,10 @@ def list_jobs(
175180
176181 results = [
177182 BugoutSearchResultWithEntryID (
178- ** dict (raw_result ), id = raw_result .entry_url .split ("/" )[- 1 ]
183+ ** dict (raw_result ),
184+ id = raw_result .entry_url .split ("/" )[- 1 ]
185+ if isinstance (raw_result , BugoutSearchResult )
186+ else raw_result .entity_url .split ("/" )[- 1 ],
179187 )
180188 for raw_result in job_results .results
181189 ]
You can’t perform that action at this time.
0 commit comments