Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

        def logical_delete(session, snapshot):
    snapshot.is_deleted = True
    return update(session, snapshot)
        


src/k/a/karesansui-HEAD/karesansui/gadget/guestby1snapshotby1.py   karesansui(Download)
 
from karesansui.db.access.machine  import findbyguest1 as m_findbyguest1
from karesansui.db.access.snapshot import findby1 as s_findby1, \
     findbyname_guestby1 as s_findbyname_guestby1, \
     logical_delete, save as save_snapshot
        snapshot = s_findbyname_guestby1(self.orm, snapshot_id, guest_id)
        if snapshot:
            logical_delete(self.orm, snapshot)
 
        return web.accepted()