#NEWLINE# @ staticmethod #NEWLINE# def add_survey( question ) : #NEWLINE# #INDENT# result = None #NEWLINE# entry = Survey ( question = question , created = text ( 'NOW()' ) , active = '1' ) #NEWLINE# DbCore . session . add ( entry ) #NEWLINE# DbCore . session . commit ( ) #NEWLINE# sondage = DbCore . session . query ( Sondage ) . filter_by ( question = question ) . first ( ) #NEWLINE# if ( sondage is not None ) : #NEWLINE# #INDENT# return sondage . id #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return None