engine/process.py
def save_media(self, message, path, media):
        """Save generated media url in the appropriate field
           of the latest feature for a message/call sender.
           Return the appropriate answer."""
        other_media = 'photo'

        if media == 'photo':
            other_media = 'video'

        if path:
            cursor.execute(f"update {self.db}features set {media} = 'https://telegra.ph{path}' "
                           f"where id = (select max(id) from {self.db}features where user_id = {message.from_user.id})")
            connection.commit()
            return answers['MEDIA_SAVED'] % (media, media, other_media)
        else:
            return answers['MEDIA_NS'] % (media, media, other_media)
Save generated media url in the appropriate field
           of the latest feature for a message/call sender.
           Return the appropriate answer.
Save generated media url in the appropriate field
of the latest feature for a message/call sender.
Return the appropriate answer.
Save generated media url in the appropriate field of the latest feature for a message / call sender . Return the appropriate answer .
def save_media(self, message, path, media):
        other_media = 'photo'
        if media == 'photo':
            other_media = 'video'
        if path:
            cursor.execute(f"update {self.db}features set {media} = 'https://telegra.ph{path}' "
                           f"where id = (select max(id) from {self.db}features where user_id = {message.from_user.id})")
            connection.commit()
            return answers['MEDIA_SAVED'] % (media, media, other_media)
        else:
            return answers['MEDIA_NS'] % (media, media, other_media)
def save_media ( self , message , path , media ) : other_media = 'photo' if media == 'photo' : other_media = 'video' if path : cursor . execute ( f"update {self.db}features set {media} = 'https://telegra.ph{path}' " f"where id = (select max(id) from {self.db}features where user_id = {message.from_user.id})" ) connection . commit ( ) return answers [ 'MEDIA_SAVED' ] % ( media , media , other_media ) else : return answers [ 'MEDIA_NS' ] % ( media , media , other_media )
Save generated media url in the appropriate field
of the latest feature for a message/call sender.
Save generated media url in the appropriate field of the latest feature for a message / call sender .
"""Save generated media url in the appropriate field
           of the latest feature for a message/call sender.
           Return the appropriate answer."""
self
message
path
media