@web.removeslash
    def put(self, entity_id=None):
        #
        # Change entity (with given ID) properties
        #
        if not self.current_user:
            return self.json({
                'error': 'Forbidden!',
                'time': round(self.request.request_time(), 3),
            }, 403)

        if not entity_id:
            return self.json({
                'error': 'No entity ID!',
                'time': round(self.request.request_time(), 3),
            }, 400)

        # entity = self.get_entities(entity_id=entity_id, limit=1)
        # if not entity:
        #     return self.json({
        #         'error': 'Entity with given ID is not found!',
        #         'time': round(self.request.request_time(), 3),
        #     }, 404)

        new_properties = {}
        for dataproperty, value in self.request.arguments.iteritems():
            if ['user', 'policy', 'signature'] in dataproperty:
                continue

            if '.' in dataproperty:
                property_definition_keyname = dataproperty.split('.')[0]
                old_property_id = dataproperty.split('.')[1]
            else:
                property_definition_keyname = dataproperty
                old_property_id = None

            if type(value) is not list:
                value = [value]

            for v in value:
                new_property_id = self.set_property(entity_id=entity_id, old_property_id=old_property_id, property_definition_keyname=property_definition_keyname, value=v)
                if new_property_id:
                    new_properties.setdefault(property_definition_keyname, []).append({'id': new_property_id, 'value': v})

        self.json({
            'result': {
                'id': entity_id,
                'properties': new_properties
            },
            'time': round(self.request.request_time(), 3),
        }, 201)
dataset/ETHPy150Open argoroots/Entu/app/api/api2.py/API2Entity.put/swapped operands of `in`