From 05ab019901c6c097bb9d5b447bd1349cdb976d42 Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Thu, 29 Sep 2022 13:22:36 -0400 Subject: [PATCH] Fix default letter names. --- undercover/routes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/undercover/routes.py b/undercover/routes.py index 2586ee8..f2957f8 100644 --- a/undercover/routes.py +++ b/undercover/routes.py @@ -140,7 +140,7 @@ def add_letter() -> Response: user = db.get_user(email_address) existing_letter_count = len(db.get_user_letters(user.id)) - new_letter_name = f'Letter{existing_letter_count + 2}' + new_letter_name = f'Letter {existing_letter_count + 1}' default_form_json = jsonify(CLForm().to_cl_data()).get_data(True) db.add_letter(user.id, new_letter_name, default_form_json) return redirect(f'/?letter_name={new_letter_name}') @@ -289,7 +289,7 @@ def generate_pdf() -> Response: letters = db.get_user_letters(user.id) letter_json = jsonify(data).get_data(True) if len(letters) == 0: - db.add_letter(user.id, 'My Cover Letter', letter_json) + db.add_letter(user.id, 'Letter1', letter_json) else: letter = letters[data.selectedLetter] # TODO: Support title editing