Skip to content

Commit

Permalink
Explicitly check if not None
Browse files Browse the repository at this point in the history
More technically correct, but wouldn't actually make a difference with
the current implementation, since even if current_row_count is 0, the
condition won't evaluate to True.
  • Loading branch information
gherceg committed Jun 20, 2024
1 parent a88b031 commit 428d5c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion corehq/apps/app_manager/fixtures/mobile_ucr.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ def get_report_element(
f"Report {report_config.report_id} row count {len(rows)} exceeds max allowed row count "
f"{settings.MAX_MOBILE_UCR_SIZE}"
)
if current_row_count and len(rows) + current_row_count > settings.MAX_MOBILE_UCR_SIZE * 2:
if current_row_count is not None and len(rows) + current_row_count > settings.MAX_MOBILE_UCR_SIZE * 2:
raise MobileUCRTooLargeException(
"You are attempting to restore too many mobile reports. Your Mobile UCR Restore Version is set to 1.0."
" Try upgrading to 2.0."
Expand Down

0 comments on commit 428d5c4

Please sign in to comment.