Skip to content

Commit 1928b97

Browse files
committed
Fix image name fetching
1 parent 3d20133 commit 1928b97

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "recnetpy"
7-
version = "0.2.61"
7+
version = "0.2.62"
88
authors = [
99
{ name="RecNetBot Development"}
1010
]

src/recnetpy/managers/image_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ async def get(self, name: str) -> Optional['Image']:
2525
:return: An image object representing the data or nothing if not found.
2626
"""
2727
data: 'Response[List[ImageResponse]]' = await self.rec_net.apim.images.v4.bulk.make_request('post', body = {'Names': name})
28-
if data.success: return self.create_dataclass(id, data.data[0])
28+
if data.data: return self.create_dataclass(id, data.data[0])
2929
return None
3030

3131

0 commit comments

Comments
 (0)