#NEWLINE# def scan_filter( ) : #NEWLINE# #INDENT# most_recent = Annotation . query . order_by ( Annotation . updated . desc ( ) ) . first ( ) #NEWLINE# if most_recent : #NEWLINE# #INDENT# last_update = most_recent . updated . isoformat ( ) #NEWLINE# return { #NEWLINE# #INDENT# 'range' : { #NEWLINE# #INDENT# 'updated' : { #NEWLINE# #INDENT# 'gte' : '{}||-1h/h' . format ( last_update ) , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# return None