• 
      

    Fix configuring search when search settings are empty.

    Review Request #11427 — Created Feb. 2, 2021 and submitted

    Information

    Review Board
    release-4.0.x

    Reviewers

    The recent work to fix search settings and bring compatibility to modern
    Haystack ended up regressing configuring a search engine if there
    weren't already stored settings. The old code conditionally ensured,
    rather than assumed, there would be a key in settings for the search
    backend, but the new code regressed that.

    This change updates the search configuration setting code to always set
    a default entry if it doesn't exist, and to populate that.

    Unit tests were added to ensure this doesn't regress again.

    Unit tests pass.

    Verified the original failure case with the unit tests, without the
    fix.

    Summary ID
    Fix configuring search when search settings are empty.
    The recent work to fix search settings and bring compatibility to modern Haystack ended up regressing configuring a search engine if there weren't already stored settings. The old code conditionally ensured, rather than assumed, there would be a key in settings for the search backend, but the new code regressed that. This change updates the search configuration setting code to always set a default entry if it doesn't exist, and to populate that. Unit tests were added to ensure this doesn't regress again.
    901c62863388f6e033d8738475e0adddccc31b9e
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-4.0.x (ee93b65)