src/dirbs/api/v2/resources/imei.py
def block_date(cursor, imei_norm: str) -> str:
    """
    Method to get block date of an IMEI from Notification and Blacklist.

    Arguments:
        cursor: PostgreSQL database connection cursor object
        imei_norm: Normalized IMEI
    Returns:
        Block Date of the IMEI if exists otherwise None
    """
    # check if it is in blacklist
    cursor.execute("""SELECT MIN(block_date) AS block_date
                        FROM classification_state
                       WHERE imei_norm = %(imei_norm)s
                         AND virt_imei_shard = calc_virt_imei_shard(%(imei_norm)s)
                         AND end_date IS NULL""",
                   {'imei_norm': imei_norm})
    imei_block_date = cursor.fetchone()
    return imei_block_date.block_date

    Method to get block date of an IMEI from Notification and Blacklist.

    Arguments:
        cursor: PostgreSQL database connection cursor object
        imei_norm: Normalized IMEI
    Returns:
        Block Date of the IMEI if exists otherwise None
    
Method to get block date of an IMEI from Notification and Blacklist.
Method to get block date of an IMEI from Notification and Blacklist .
def block_date(cursor, imei_norm: str) -> str:
    cursor.execute("""SELECT MIN(block_date) AS block_date
                        FROM classification_state
                       WHERE imei_norm = %(imei_norm)s
                         AND virt_imei_shard = calc_virt_imei_shard(%(imei_norm)s)
                         AND end_date IS NULL""",
                   {'imei_norm': imei_norm})
    imei_block_date = cursor.fetchone()
    return imei_block_date.block_date
def block_date ( cursor , imei_norm : str ) -> str : cursor . execute ( """SELECT MIN(block_date) AS block_date
                        FROM classification_state
                       WHERE imei_norm = %(imei_norm)s
                         AND virt_imei_shard = calc_virt_imei_shard(%(imei_norm)s)
                         AND end_date IS NULL""" , { 'imei_norm' : imei_norm } ) imei_block_date = cursor . fetchone ( ) return imei_block_date . block_date
Method to get block date of an IMEI from Notification and Blacklist.
Method to get block date of an IMEI from Notification and Blacklist .
"""
    Method to get block date of an IMEI from Notification and Blacklist.

    Arguments:
        cursor: PostgreSQL database connection cursor object
        imei_norm: Normalized IMEI
    Returns:
        Block Date of the IMEI if exists otherwise None
    """ # check if it is in blacklist
Block Date of the IMEI if exists otherwise None
Block Date of the IMEI if exists otherwise None
cursor
PostgreSQL database connection cursor object
PostgreSQL database connection cursor object
imei_norm
str
None