#NEWLINE# @ staticmethod #NEWLINE# def sync_resource_filter_onaccept( form ) : #NEWLINE# #INDENT# '\n            Reset last_push when adding/changing a filter\n        ' #NEWLINE# db = current . db #NEWLINE# s3db = current . s3db #NEWLINE# ttable = s3db . sync_task #NEWLINE# ftable = s3db . sync_resource_filter #NEWLINE# if isinstance ( form , Row ) : #NEWLINE# #INDENT# filter_id = form . id #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# filter_id = form . vars . id #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# #UNINDENT# row = db ( ( ftable . id == filter_id ) ) . select ( ftable . id , ftable . deleted , ftable . task_id , ftable . deleted_fk , limitby = ( 0 , 1 ) ) . first ( ) #NEWLINE# if row : #NEWLINE# #INDENT# task_id = None #NEWLINE# if row . deleted : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# deleted_fk = json . loads ( row . deleted_fk ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# if ( 'task_id' in deleted_fk ) : #NEWLINE# #INDENT# task_id = deleted_fk [ 'task_id' ] #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# task_id = row . task_id #NEWLINE# #UNINDENT# if task_id : #NEWLINE# #INDENT# db ( ( ttable . id == task_id ) ) . update ( last_push = None ) #NEWLINE# #UNINDENT# #UNINDENT# return