Asserts should be about what cannot possibly happen, due to the structure of the code.  This function is only called from the dashboard view, and accepts data from the request (I think?)   Is an assert the right thing here, or a test and a raise?