Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Remove fixmes
Marcin Gębala5e9ef8d18d42
diff --git a/saleor/graphql/core/mutations.py b/saleor/graphql/core/mutations.pyindex fd215b33ad..4dd6edb1b1 100644--- a/saleor/graphql/core/mutations.py+++ b/saleor/graphql/core/mutations.py@@ -103,8 +103,6 @@ class BaseMutation(graphene.Mutation):try:instances = get_nodes(ids, only_type)except GraphQLError as e:- # FIXME: czy zawsze tutaj powinien lecieć ValidationError? moze- # tylko jak nie znaleziono danego IDka?raise ValidationError({field: str(e)})return instances@@ -325,11 +323,11 @@ class ModelMutation(BaseMutation):errors = [] # Initialize the errors list.instance = cls.get_instance(info, errors, **data)- input_data = data.get('input') # FIXME: pass data to clean_input+ input_data = data.get('input')cleaned_input = cls.clean_input(info, instance, input_data, errors)- instance = cls.construct_instance(instance, cleaned_input) # FIXME: maybe rename to `populate_instance`- cls.clean_instance(instance, errors) # FIXME: maybe rename to `pre_save_instance` ?+ instance = cls.construct_instance(instance, cleaned_input)+ cls.clean_instance(instance, errors)cls.save(info, instance, cleaned_input)cls._save_m2m(info, instance, cleaned_input)return cls.success_response(instance)diff --git a/saleor/graphql/product/mutations/attributes.py b/saleor/graphql/product/mutations/attributes.pyindex 44c5e30ee6..a436390683 100644--- a/saleor/graphql/product/mutations/attributes.py+++ b/saleor/graphql/product/mutations/attributes.py@@ -188,7 +188,6 @@ class AttributeUpdate(AttributeMixin, ModelMutation):for value in remove_values:if value.attribute != instance:msg = 'Value %s does not belong to this attribute.' % value- # FIXME: HANDLE THISraise ValidationError({'remove_values': msg})return remove_valuesdiff --git a/saleor/payment/gateways/braintree/forms.py b/saleor/payment/gateways/braintree/forms.pyindex 52d6a45631..a67c64f104 100644--- a/saleor/payment/gateways/braintree/forms.py+++ b/saleor/payment/gateways/braintree/forms.py@@ -18,10 +18,6 @@ class BraintreePaymentForm(forms.Form):self.payment_information = payment_informationself.fields['amount'].initial = payment_information['amount']- # FIXME IMPROVEMENT:- # if environment is Sandbox, we could provide couple of predefined- # nounces for easier testing-def clean(self):cleaned_data = super().clean()# Amount is sent client-side