From 496f91bada66f9f48c92304c3321938e34aa700e Mon Sep 17 00:00:00 2001 From: Lars van de Kerkhof Date: Thu, 28 Sep 2023 16:42:50 +0200 Subject: [PATCH] removed debug code --- oscarapi/serializers/admin/product.py | 1 - oscarapi/serializers/product.py | 6 ------ 2 files changed, 7 deletions(-) diff --git a/oscarapi/serializers/admin/product.py b/oscarapi/serializers/admin/product.py index 1fa5842a..1843b02c 100644 --- a/oscarapi/serializers/admin/product.py +++ b/oscarapi/serializers/admin/product.py @@ -150,7 +150,6 @@ def update(self, instance, validated_data): attribute__product_class=product_class ): code = attribute_value.attribute.code - print("moet je peopen", code, "harrie", pclass_option_codes) if ( code in attribute_codes ): # if the attribute exist also on the new product class, update the attribute diff --git a/oscarapi/serializers/product.py b/oscarapi/serializers/product.py index 02334d21..491996c6 100644 --- a/oscarapi/serializers/product.py +++ b/oscarapi/serializers/product.py @@ -203,10 +203,7 @@ def to_internal_value(self, data): product_class, code = getitems(item, "product_class", "code") if product_class: productclasses.add(product_class) - # if code: - # attributes.add(code) - print(productclasses) # if all attributes belong to the same productclass, everything is just # as expected and we can do an optimization by only resolving the productclass to the model instance and nothing else. try: @@ -251,18 +248,15 @@ def update(self, instance, validated_data): attr_codes = [] product.attr.initialize() for validated_datum in validated_data: - print(validated_datum) # leave all the attribute saving to the ProductAttributesContainer instead # of the child serializers attribute, value = getitems(validated_datum, "attribute", "value") if hasattr( attribute, "code" ): # if the attribute is a model instance use the code - print(" i set dem pussyes") product.attr.set(attribute.code, value) attr_codes.append(attribute.code) else: - print(" set dem reten") product.attr.set(attribute, value) attr_codes.append(attribute)