def clean_post_data(post_data):
    """
    Removes None values from data, so that it can posted to Django's test
    client without TypeError being raised in Django 2.2+
    """
    return {
        key: value for key, value in post_data.items()
        if value is not None
    }