engine/process.py
def survey_next(self, message):
        """Get the latest question for a survey,
           if None, insert the survey name for a message/call sender."""
        cursor.execute(f"select question from {self.db}questions where id = (select max(id) from {self.db}questions "
                       f"where survey = '{self.get_survey(message)}')")
        if cursor.fetchall()[0][0]:
            cursor.execute(f"insert into {self.db}questions (id, survey, author) values (default, "
                           f"'{self.get_survey(message)}', {message.from_user.id})")
            connection.commit()
Get the latest question for a survey,
           if None, insert the survey name for a message/call sender.
Get the latest question for a survey,
if None, insert the survey name for a message/call sender.
Get the latest question for a survey if None insert the survey name for a message / call sender .
def survey_next(self, message):
        cursor.execute(f"select question from {self.db}questions where id = (select max(id) from {self.db}questions "
                       f"where survey = '{self.get_survey(message)}')")
        if cursor.fetchall()[0][0]:
            cursor.execute(f"insert into {self.db}questions (id, survey, author) values (default, "
                           f"'{self.get_survey(message)}', {message.from_user.id})")
            connection.commit()
def survey_next ( self , message ) : cursor . execute ( f"select question from {self.db}questions where id = (select max(id) from {self.db}questions " f"where survey = '{self.get_survey(message)}')" ) if cursor . fetchall ( ) [ 0 ] [ 0 ] : cursor . execute ( f"insert into {self.db}questions (id, survey, author) values (default, " f"'{self.get_survey(message)}', {message.from_user.id})" ) connection . commit ( )
Get the latest question for a survey,
if None, insert the survey name for a message/call sender.
Get the latest question for a survey if None insert the survey name for a message / call sender .
"""Get the latest question for a survey,
           if None, insert the survey name for a message/call sender."""
self
message