huskar_api/models/catalog/schema.py
def make_dummy(cls, data, **kwargs):
        """Make a dummy instance to support read-only operations."""
        # TODO Could we find a better way?
        instance = cls(client=None, **kwargs)
        instance.load = None
        instance.save = None
        if data:
            try:
                instance.data, _ = cls.MARSHMALLOW_SCHEMA.loads(data)
            except cls._MALFORMED_DATA_EXCEPTIONS as e:
                raise MalformedDataError(instance, e)
        return instance
Make a dummy instance to support read-only operations.
Make a dummy instance to support read-only operations.
Make a dummy instance to support read - only operations .
def make_dummy(cls, data, **kwargs):
        instance = cls(client=None, **kwargs)
        instance.load = None
        instance.save = None
        if data:
            try:
                instance.data, _ = cls.MARSHMALLOW_SCHEMA.loads(data)
            except cls._MALFORMED_DATA_EXCEPTIONS as e:
                raise MalformedDataError(instance, e)
        return instance
def make_dummy ( cls , data , ** kwargs ) : instance = cls ( client = None , ** kwargs ) instance . load = None instance . save = None if data : try : instance . data , _ = cls . MARSHMALLOW_SCHEMA . loads ( data ) except cls . _MALFORMED_DATA_EXCEPTIONS as e : raise MalformedDataError ( instance , e ) return instance
Make a dummy instance to support read-only operations.
Make a dummy instance to support read - only operations .
"""Make a dummy instance to support read-only operations.""" # TODO Could we find a better way?
cls
data