@staff_member_required
def ajax_add_star(request, pk):
    """ Star or unstar report for user
    """
    report = get_object_or_404(Report, pk=pk)
    user = request.user
    if report.starred.all() in user:
        added = False
        report.starred.remove(request.user)
    else:
        added = True
        report.starred.add(request.user)
    return HttpResponse(added)
dataset/ETHPy150Open burke-software/django-report-builder/report_builder/views.py/ajax_add_star/swapped operands of `in`