Fix a couple bugs in clean-orphaned-data.

Review Request #13862 — Created May 16, 2024 and submitted — Latest diff uploaded

Information

Review Board
release-7.x

Reviewers

The clean-orphaned-data command had two bugs, one of which was bad.

  1. The query for orphaned change descriptions was picking up change
    descriptions which were part of active drafts.
  2. The help string was wrapped in gettext_lazy, which was causing a
    crash when trying to use --help because argparse doesn't understand a
    django lazy object. Our other commands use regular gettext for
    those, so I've changed it here. The invalidate-api-tokens command
    had the same problem.
  • Was able to use manage.py clean-orphaned-data --help
  • Verified that clean-orphaned-data was no longer picking up any
    objects which were still connected to active drafts.

Commits

Files