'Ensure that at least one object type is specified.'

def validate(self, attrs):

    if (len(attrs) == 0):
        raise serializers.ValidationError('Feed    item    cannot    be    empty.')
    item_changed = any((k for k in self.Meta.item_types if (k in attrs.keys())))
    num_defined = sum((1 for item in self.Meta.item_types if attrs.get(item)))
    if (item_changed and (num_defined != 1)):
        message = ('A    valid    value    for    exactly    one    of    the    following    parameters    must    be    defined:    %s' % ','.join(self.Meta.item_types))
        raise serializers.ValidationError(message)
    return attrs
