Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Drop AttributeScalar

IKarbowiakd255dee2c542
diff --git a/saleor/graphql/product/scalars.py b/saleor/graphql/product/scalars.py
deleted file mode 100644
index 01680c3997..0000000000
--- a/saleor/graphql/product/scalars.py
+++ /dev/null
@@ -1,26 +0,0 @@
-from graphene.types import Scalar
-from graphql.language import ast
-
-
-class AttributeScalar(Scalar):
- @staticmethod
- def parse_literal(node):
- if isinstance(node, ast.StringValue):
- split = node.value.split(":")
- if len(split) == 2:
- return tuple(split)
- return None
-
- @staticmethod
- def parse_value(value):
- if isinstance(value, str):
- split = value.split(":")
- if len(split) == 2:
- return tuple(split)
- return None
-
- @staticmethod
- def serialize(value):
- if isinstance(value, tuple) and len(value) == 2:
- return ":".join(value)
- return None