(data)
return data
Check for missing keys.
Check for missing keys.
Check for missing keys .
def validate_login_data(data):
    """Check for missing keys."""
    data["uid"] = data.get("uid", gen_uid(const.SIZE_UID, uid_format=True))
    data["device_id"] = data.get("device_id", const.DEVICE_ID)

    return data
def validate_login_data ( data ) : data [ "uid" ] = data . get ( "uid" , gen_uid ( const . SIZE_UID , uid_format = True ) ) data [ "device_id" ] = data . get ( "device_id" , const . DEVICE_ID ) return data