From f65e2e8c8f14b78387ccd6b170ebd945f265ded3 Mon Sep 17 00:00:00 2001 From: Viggo de Vries Date: Wed, 15 May 2024 15:16:14 +0200 Subject: [PATCH] Lekker snugger dan --- oscarapi/utils/exists.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/oscarapi/utils/exists.py b/oscarapi/utils/exists.py index 4e5f7db3..588ef575 100644 --- a/oscarapi/utils/exists.py +++ b/oscarapi/utils/exists.py @@ -56,8 +56,7 @@ def find_existing_attribute_option_group(name, options): query = ( AttributeOptionGroup.objects.filter(name=name) .annotate(options_count=models.Count("options")) - .filter(options_count=len(options)) - .filter(options__option__in=options) + .filter(options_count=len(options), options__option__in=options) ) try: