Commit 7112c09
fix: Only include Actor standby when at least one field is provided (#597)
Update the `get_actor_representation` function to conditionally include
the `actor_standby` object only when at least one of its fields is not
None. This prevents sending empty or null-only actor_standby objects to
the API.
**Background:**
According to the API changes, `actor_standby` is optional and should
only be included when needed. When present, `is_enabled` is the only
required field within the object.
**Changes:**
- Modified `get_actor_representation()` to conditionally add
`actor_standby` to the Actor dictionary
- The object is only included if at least one of the following fields is
not None:
- `actor_standby_is_enabled`
- `actor_standby_desired_requests_per_actor_run`
- `actor_standby_max_requests_per_actor_run`
- `actor_standby_idle_timeout_secs`
- `actor_standby_build`
- `actor_standby_memory_mbytes`
**Related:**
- Related JS client issue:
apify/apify-client-js#832
Closes #595
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent e0dad8b commit 7112c09
1 file changed
+20
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
89 | 104 | | |
90 | 105 | | |
91 | 106 | | |
92 | 107 | | |
93 | 108 | | |
94 | 109 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
99 | 113 | | |
100 | 114 | | |
101 | 115 | | |
| |||
0 commit comments