Beispiel #1
0
def no_account_list(request):
    person_id_list = []

    for u in Person.objects.all():
        if not u.has_account():
            person_id_list.append(u.id)

    persons = Person.objects.filter(id__in=person_id_list)
    return user_list(request, persons, 'No accounts')
Beispiel #2
0
def no_account_list(request):
    person_id_list = []

    for u in Person.objects.all():
        for project in u.projects.all():
            for pc in project.projectquota_set.all():
                if not u.has_account(pc.machine_category):
                    person_id_list.append(u.id)

    persons = Person.objects.filter(id__in=person_id_list)
    return user_list(request, persons, 'No accounts')
Beispiel #3
0
def no_account_list(request):
    person_id_list = []

    for u in Person.objects.all():
        for project in u.projects.all():
            for pc in project.projectquota_set.all():
                if not u.has_account(pc.machine_category):
                    person_id_list.append(u.id)

    persons = Person.objects.filter(id__in=person_id_list)
    return user_list(request, persons, 'No accounts')
Beispiel #4
0
def wrong_default_list(request):
    wrong = []
    for u in Person.active.all():
        for ua in u.account_set.filter(date_deleted__isnull=True):
            d = False
            for p in ua.project_list():
                if p == ua.default_project:
                    d = True
            if not d:
                if not u.is_locked():
                    wrong.append(u.id)

    persons = Person.objects.filter(id__in=wrong)
    return user_list(request, persons, 'Wrong default projects')
Beispiel #5
0
def wrong_default_list(request):
    wrong = []
    for u in Person.active.all():
        for ua in u.account_set.filter(
                machine_category__id=1, date_deleted__isnull=True):
            d = False
            for p in ua.project_list():
                if p == ua.default_project:
                    d = True
            if not d:
                if not u.is_locked():
                    wrong.append(u.id)

    persons = Person.objects.filter(id__in=wrong)
    return user_list(request, persons, 'Wrong default projects')
Beispiel #6
0
def no_default_list(request):
    persons = Person.objects.filter(
        account__isnull=False,
        account__default_project__isnull=True,
        account__date_deleted__isnull=True)
    return user_list(request, persons, 'No default projects')
Beispiel #7
0
def no_project_list(request):
    persons = Person.active.filter(
        groups__project__isnull=True, account__isnull=False)
    return user_list(request, persons, 'No projects')
Beispiel #8
0
def no_default_list(request):
    persons = Person.objects.filter(account__isnull=False,
                                    account__default_project__isnull=True,
                                    account__date_deleted__isnull=True)
    return user_list(request, persons, 'No default projects')
Beispiel #9
0
def no_project_list(request):
    persons = Person.active.filter(groups__project__isnull=True,
                                   account__isnull=False)
    return user_list(request, persons, 'No projects')