Skip to content

Commit

Permalink
Update null behaviour for invalid CUBEkey
Browse files Browse the repository at this point in the history
  • Loading branch information
rudolphpienaar committed May 17, 2024
1 parent 83b1627 commit 54fa1c8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pypx/nxstatus.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ async def registeredDICOMcount_getFromCUBE(self) -> int:
# pudb.set_trace()
d_CUBE: dict[str, Any] = self.CUBEinfo_get()
registered: int = 0
if not d_CUBE:
return registered

auth: aiohttp.BasicAuth = aiohttp.BasicAuth(
d_CUBE["username"], d_CUBE["password"]
Expand Down Expand Up @@ -188,7 +190,7 @@ async def run(self, opt={}) -> dict:
requested: int = self.requestedDICOMcount_getForSeries(opt)
packed: int = self.registeredDICOMcount_getFromFS(opt["series"])
registered: int = await self.registeredDICOMcount_getFromCUBE()
if not registered:
if not packed:
return d_status
d_status = self.status_update(requested, packed, registered, d_status)
d_status["study"]["seriesListInStudy"]["SeriesInstanceUID"] = opt[
Expand Down

0 comments on commit 54fa1c8

Please sign in to comment.