Ejemplo n.º 1
0
def delete(detail):
    if type(detail) == list:
        return list(map(lambda d: delete(d), detail))

    elif type(detail) == dict:
        id = define_id(detail)
    else:
        id = detail

    entity = Datastore.delete(KIND, id)
    logger.debug('delete %s', id)
    return Datastore.entity_to_dict(entity)
Ejemplo n.º 2
0
def delete(person):
    if type(person) == list:
        return list(map(lambda p: delete(p), person))

    elif type(person) == dict:
        id = define_id(person)
    else:
        id = person

    entity = Datastore.delete(KIND, id)
    logger.debug('delete %s', id)
    return Datastore.entity_to_dict(entity)
Ejemplo n.º 3
0
def delete(cluster):
    if type(cluster) == list:
        return list(map(lambda c: delete(c), cluster))

    elif type(cluster) == dict:
        id = define_id(cluster)
    else:
        id = cluster

    entity = Datastore.delete(KIND, id)
    logger.debug('delete %s', id)
    return Datastore.entity_to_dict(entity)
Ejemplo n.º 4
0
def delete_by_no(person):
    if type(person) == list:
        return list(map(lambda p: delete_by_no(p), person))
    entity = Datastore.find_one(KIND, 'no', person['no'])

    return Datastore.delete(KIND, entity.key.id)