sobjects/hooks.py
branchtls-sprint
changeset 1138 22f634977c95
parent 1101 0c067de38e46
child 1398 5fe84a5f7035
equal deleted inserted replaced
1135:00eb43688a57 1138:22f634977c95
    20         if 'login' in entity and entity['login']:
    20         if 'login' in entity and entity['login']:
    21             entity['login'] = entity['login'].strip()
    21             entity['login'] = entity['login'].strip()
    22 
    22 
    23 
    23 
    24 class AutoDeleteBookmark(PreCommitOperation):
    24 class AutoDeleteBookmark(PreCommitOperation):
       
    25     beid = None # make pylint happy
    25     def precommit_event(self):
    26     def precommit_event(self):
    26         session = self.session
    27         session = self.session
    27         if not self.beid in session.query_data('pendingeids', ()):
    28         if not self.beid in session.query_data('pendingeids', ()):
    28             if not session.unsafe_execute('Any X WHERE X bookmarked_by U, X eid %(x)s',
    29             if not session.unsafe_execute('Any X WHERE X bookmarked_by U, X eid %(x)s',
    29                                           {'x': self.beid}, 'x'):
    30                                           {'x': self.beid}, 'x'):