Override instance get_type on scalar instantiation for backwards-compativbility

This commit is contained in:
Markus Padourek 2016-10-21 09:45:55 +01:00 committed by GitHub
parent d3305f6056
commit 014769294b

View File

@ -37,10 +37,16 @@ class Scalar(six.with_metaclass(ScalarTypeMeta, UnmountedType)):
used to parse input from ast or variables and to ensure validity.
'''
def __init__(self):
def get_type(self):
return self
self.get_type = types.MethodType(get_type, self)
serialize = None
parse_value = None
parse_literal = None
@classmethod
def get_type(self):
return self