Skip to content

Conversation

@heathdutton
Copy link

Fixes #7201

When deleting disconnected filesystem submissions, if a file has zero bytes, rate becomes 0 after the first deletion. On subsequent iterations, the ETA calculation filesize / rate causes a ZeroDivisionError.

This adds a guard to skip the ETA calculation when rate is zero.

Test plan

  1. Create a disconnected empty file in the store
  2. Run manage.py delete-disconnected-fs-submissions --force
  3. Verify no ZeroDivisionError occurs

Checklist

This change accounts for:

  • any required additional documentation
  • any necessary AppArmor changes (added or removed application files)
  • any impact on new SecureDrop installs and upgrades
  • our dependency update policy

@heathdutton heathdutton requested a review from a team as a code owner December 31, 2025 17:37
@legoktm
Copy link
Member

legoktm commented Jan 6, 2026

@heathdutton hi, thanks for submitting all these PRs! It'll take us a bit of time to get to reviewing them as our main priority is on the SecureDrop Workstation side of things right now. And you don't need to keep updating them, if there are conflicts we'll rebase when needed.

Also please let us know if you used any AI/LLM tools when creating these so we can review accordingly.

@zenmonkeykstop zenmonkeykstop moved this to Next sprint candidates in SecureDrop Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Next sprint candidates

Development

Successfully merging this pull request may close these issues.

division by zero in manage.py delete-disconnected-fs-submissions

2 participants