From b3be94e7556c047172b57a19a9807ef87bf10ca5 Mon Sep 17 00:00:00 2001 From: Holger Trampe Date: Fri, 22 Oct 2021 23:32:36 +0200 Subject: [PATCH] trocken ist toll --- adm/views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/adm/views.py b/adm/views.py index 73ce0f9..5fdf058 100644 --- a/adm/views.py +++ b/adm/views.py @@ -710,11 +710,11 @@ class AdmImportFlow(TemplateView): ag_pk = str(agency.pk) ag_groups = [] for g in groups: - # GET AGENCY GROUP - agencygroupcheck = AgencyGroup.objects.filter(group=g).first() - if(ag_pk in g.name and str(agencygroupcheck.agency.pk) == ag_pk): - ag_groups.append(g) + #gencygroupcheck = AgencyGroup.objects.get(group=g.id) + for ag_group_agency in AgencyGroup.objects.filter(group=g): + if(ag_pk in g.name and str(ag_group_agency.agency.pk) == ag_pk): + ag_groups.append(g) context.update({'groups' : ag_groups})