Skip to content

Commit 5b924ca

Browse files
committed
Exclude target when equal to min for responses (attempt 2)
1 parent 4d858ae commit 5b924ca

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/dstack/_internal/core/models/fleets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def dict(self, *args, **kwargs) -> Dict:
168168
res = CoreModel.dict(self, *args, **kwargs)
169169
# For backward compatibility with old clients
170170
# that do not ignore extra fields due to https://github.com/dstackai/dstack/issues/3066
171-
if hasattr(res, "target") and res["target"] == res["min"]:
171+
if "target" in res and res["target"] == res["min"]:
172172
del res["target"]
173173
return res
174174

0 commit comments

Comments
 (0)