We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be45452 commit a0f894eCopy full SHA for a0f894e
src/apify/_charging.py
@@ -226,7 +226,8 @@ def calculate_chargeable() -> dict[str, int | None]:
226
# START OF CRITICAL SECTION - no awaits here
227
228
# Determine the maximum amount of events that can be charged within the budget
229
- charged_count = min(count, self.calculate_max_event_charge_count_within_limit(event_name) or count)
+ max_chargeable = self.calculate_max_event_charge_count_within_limit(event_name)
230
+ charged_count = min(count, max_chargeable if max_chargeable is not None else count)
231
232
if charged_count == 0:
233
return ChargeResult(
0 commit comments