• 
      

    Fix a couple bugs in clean-orphaned-data.

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

    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.
    Summary ID
    Fix a couple bugs in clean-orphaned-data.
    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. Testing Done: - 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.
    29d0c1c2febacf52dd2694429dbd5f1ed7c05941
    maubin
    1. Ship It!
    2. 
        
    chipx86
    1. Ship It!
    2. 
        
    david
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-7.x (ad596d2)