regression fix: remove 'project' from non-raw crawl object getters, (#1778)
unnecessary projection prevents creating Crawl object, now removed Fixes #1777
This commit is contained in:
parent
fef2b43072
commit
26abbddd62
@ -149,10 +149,9 @@ class BaseCrawlOps:
|
|||||||
crawlid: str,
|
crawlid: str,
|
||||||
org: Optional[Organization] = None,
|
org: Optional[Organization] = None,
|
||||||
type_: Optional[str] = None,
|
type_: Optional[str] = None,
|
||||||
project: Optional[dict[str, bool]] = None,
|
|
||||||
) -> BaseCrawl:
|
) -> BaseCrawl:
|
||||||
"""Get crawl data for internal use"""
|
"""Get crawl data for internal use"""
|
||||||
res = await self.get_crawl_raw(crawlid, org, type_, project)
|
res = await self.get_crawl_raw(crawlid, org, type_)
|
||||||
return BaseCrawl.from_dict(res)
|
return BaseCrawl.from_dict(res)
|
||||||
|
|
||||||
async def get_crawl_out(
|
async def get_crawl_out(
|
||||||
|
@ -98,10 +98,9 @@ class CrawlOps(BaseCrawlOps):
|
|||||||
self,
|
self,
|
||||||
crawlid: str,
|
crawlid: str,
|
||||||
org: Optional[Organization] = None,
|
org: Optional[Organization] = None,
|
||||||
project: Optional[dict[str, bool]] = None,
|
|
||||||
) -> Crawl:
|
) -> Crawl:
|
||||||
"""Get crawl data for internal use"""
|
"""Get crawl data for internal use"""
|
||||||
res = await self.get_crawl_raw(crawlid, org, "crawl", project)
|
res = await self.get_crawl_raw(crawlid, org, "crawl")
|
||||||
return Crawl.from_dict(res)
|
return Crawl.from_dict(res)
|
||||||
|
|
||||||
@contextlib.asynccontextmanager
|
@contextlib.asynccontextmanager
|
||||||
@ -479,7 +478,7 @@ class CrawlOps(BaseCrawlOps):
|
|||||||
"""add new exclusion to config or remove exclusion from config
|
"""add new exclusion to config or remove exclusion from config
|
||||||
for given crawl_id, update config on crawl"""
|
for given crawl_id, update config on crawl"""
|
||||||
|
|
||||||
crawl = await self.get_crawl(crawl_id, org, project={"cid": True})
|
crawl = await self.get_crawl(crawl_id, org)
|
||||||
|
|
||||||
cid = crawl.cid
|
cid = crawl.cid
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user