This commit is contained in:
+3
-1
@@ -77,7 +77,9 @@ class AutoDLClient:
|
||||
"/api/v1/dev/instance/pro/image/private/list",
|
||||
{"page_index": 1, "page_size": 100},
|
||||
)
|
||||
return list(data.get("list", []))
|
||||
# AutoDL returns JSON null instead of [] when the account has no
|
||||
# private images. Treat both representations as an empty result.
|
||||
return list(data.get("list") or [])
|
||||
|
||||
def create(self, spec: dict[str, Any]) -> str:
|
||||
return str(self.request("POST", "/api/v1/dev/instance/pro/create", spec))
|
||||
|
||||
Reference in New Issue
Block a user