def insert_earned_achievement(aid, data):

    db = api.common.get_conn()

    tid, uid = data.pop("tid"), data.pop("uid")
    name, description = data.pop("name"), data.pop("description")

    db.earned_achievements.insert({
        "aid": aid,
        "tid": tid,
        "uid": uid,
        "data": data,
        "name": name,
        "description": description,
        "timestamp": datetime.utcnow().timestamp(),
        "seen": False
    })
Activate an enabled serial number and get its CIK.
dataset/ETHPy150Open IceCTF/ctf-platform/api/api/achievement.py/insert_earned_achievement--crossover with--dataset/ETHPy150Open exosite/exoline/exoline/plugins/provision.py/Plugin.sn.activate