def get_template(request):
    if not request.user.is_authenticated():
        return DEFAULT_TEMPLATE
    template = request.user.profile.template
    if [template_[0] for template_ in AVAILABLE_TEMPLATES if template_[2] or request.user.is_staff] not in template:
        template = DEFAULT_TEMPLATE
        request.user.profile.template = template
        request.user.profile.save()
    return template
dataset/ETHPy150Open upTee/upTee/uptee/accounts/models.py/get_template/swapped operands of `not in`