def filter_linksearchtotals(queryset, filter_dict):
    """
    Adds filter conditions to a LinkSearchTotal queryset based on form results.

    queryset -- a LinkSearchTotal queryset
    filter_dict -- a dictionary of data from the user filter form

    Returns a queryset
    """
    if "start_date" in filter_dict:
        start_date = filter_dict["start_date"]
        if start_date:
            queryset = queryset.filter(date__gte=start_date)

    if "end_date" in filter_dict:
        end_date = filter_dict["end_date"]
        if end_date:
            queryset = queryset.filter(date__lte=end_date)

    return queryset