Fix a couple bugs in clean-orphaned-data.
Review Request #13862 — Created May 16, 2024 and submitted — Latest diff uploaded
The clean-orphaned-data command had two bugs, one of which was bad.
- The query for orphaned change descriptions was picking up change
descriptions which were part of active drafts.- 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 regulargettextfor
those, so I've changed it here. Theinvalidate-api-tokenscommand
had the same problem.
- Was able to use
manage.py clean-orphaned-data --help - Verified that
clean-orphaned-datawas no longer picking up any
objects which were still connected to active drafts.