from atlas_um.pgdb import DNAAccount def get_sub_by_auth0_user(user): sub = user.user_id return sub.replace("auth0|", DNAAccount.SUB_PREFIX)