engine/process.py
def polygon_create(self, message, poly_points):
        """Make sure that the poly_points list has
           matching the first and last elements. Save polygon and
           time in the latest feature for a message/call sender. Return
           the proper answer"""
        if poly_points[0] != poly_points[-1]:
            poly_points.append(poly_points[0])

        vertices = ','.join(poly_points)
        time = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")

        cursor.execute(f"update {self.db}features set polygon = ST_GeomFromText("
                       f"'POLYGON(({vertices}))',4326), entr_time ='{time}'"
                       f"where id = (select max(id) from {self.db}features where user_id = {message.from_user.id})")
        connection.commit()

        return answers['POLYGON_MEDIA']
Make sure that the poly_points list has
           matching the first and last elements. Save polygon and
           time in the latest feature for a message/call sender. Return
           the proper answer
Make sure that the poly_points list has
matching the first and last elements. Save polygon and
time in the latest feature for a message/call sender. Return
the proper answer
Make sure that the poly_points list has matching the first and last elements . Save polygon and time in the latest feature for a message / call sender . Return the proper answer
def polygon_create(self, message, poly_points):
        if poly_points[0] != poly_points[-1]:
            poly_points.append(poly_points[0])
        vertices = ','.join(poly_points)
        time = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
        cursor.execute(f"update {self.db}features set polygon = ST_GeomFromText("
                       f"'POLYGON(({vertices}))',4326), entr_time ='{time}'"
                       f"where id = (select max(id) from {self.db}features where user_id = {message.from_user.id})")
        connection.commit()
        return answers['POLYGON_MEDIA']
def polygon_create ( self , message , poly_points ) : if poly_points [ 0 ] != poly_points [ - 1 ] : poly_points . append ( poly_points [ 0 ] ) vertices = ',' . join ( poly_points ) time = datetime . datetime . now ( ) . strftime ( "%Y-%m-%d %H:%M:%S" ) cursor . execute ( f"update {self.db}features set polygon = ST_GeomFromText(" f"'POLYGON(({vertices}))',4326), entr_time ='{time}'" f"where id = (select max(id) from {self.db}features where user_id = {message.from_user.id})" ) connection . commit ( ) return answers [ 'POLYGON_MEDIA' ]
Make sure that the poly_points list has
matching the first and last elements.
Make sure that the poly_points list has matching the first and last elements .
"""Make sure that the poly_points list has
           matching the first and last elements. Save polygon and
           time in the latest feature for a message/call sender. Return
           the proper answer"""
self
message
poly_points