Schematics serializer override

        :return: dict

def to_primitive(self, value, context=None):
        """ Schematics serializer override

        :return: dict
        """

        if context and context.get('rel_ids'):
            return value.rid
        else:
            return {'rtype': value.rtype, 'rid': value.rid}