@marcus-wiegand suggested a way to implement this more easily: Could such a code be created from the Leave Applicaten record names (For example, HR-LAP-2023-00089)? Since only booked Leave ...
GitHub

nhan1999tb/app.py

def load_uids(): if not os.path.exists(UID_FILE): with open(UID_FILE, "w") as f: json.dump([], f) with open(UID_FILE, "r") as f: return json.load(f) def save_uids ...