Skip to content

Commit 472ac5d

Browse files
committed
fix: require an active context to check who set the charge limit
1 parent 0948935 commit 472ac5d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎src/apify/_charging.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,7 @@ def calculate_remaining_budget(self) -> Decimal:
575575
"""Return the part of `max_total_charge_usd` not charged by this Actor run nor reserved for its child runs."""
576576
return self._max_total_charge_usd - self.calculate_total_charged_amount() - self.child_run_reservations()
577577

578+
@_ensure_context
578579
async def is_max_total_charge_usd_set_by_user(self) -> bool:
579580
"""Return whether `max_total_charge_usd` was set for this Actor run, not defaulted by the platform.
580581

0 commit comments

Comments
 (0)