webkom / lego

Backend for abakus.no
https://lego.abakus.no
MIT License
52 stars 20 forks source link

Allow empty notification channels #3570

Closed AdrianAndersen closed 4 months ago

AdrianAndersen commented 4 months ago

Currently, lego throws a nasty error if you try to remove both "email" and "push" from the notification settings. This is because the model for the notifications does not allow an empty list.

This PR simply allows the list of channels to be empty, which is the expected behaviour.

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 89.04%. Comparing base (be1c3ee) to head (530ddd3).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #3570 +/- ## ======================================= Coverage 89.04% 89.04% ======================================= Files 677 678 +1 Lines 21256 21262 +6 ======================================= + Hits 18927 18933 +6 Misses 2329 2329 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

AdrianAndersen commented 4 months ago

Resolves ABA-880