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 regulargettext
for
those, so I've changed it here. Theinvalidate-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.