Skip to content

Commit 1cd42f0

Browse files
author
Andrey
committed
Add changes.
1 parent ebe120f commit 1cd42f0

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

bugout/jobs.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,16 @@
88
from enum import Enum
99
import json
1010
import os
11-
import requests
11+
import requests # type: ignore
1212
from typing import Callable, Optional, List
1313

1414
from .app import Bugout
15-
from .data import AuthType, BugoutSearchResultWithEntryID
15+
from .data import (
16+
AuthType,
17+
BugoutSearchResultWithEntryID,
18+
BugoutSearchResult,
19+
BugoutSearchResult,
20+
)
1621
from .journal import SearchOrder
1722
from .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
]

0 commit comments

Comments
 (0)