From 3724d2c826cc30e1da9296fbe664c1ca967bfa20 Mon Sep 17 00:00:00 2001 From: andmag <andmag@stud.ntnu.no> Date: Thu, 10 Jun 2021 14:25:48 +0200 Subject: [PATCH] fixed tiny bug in match for rematch --- api/endpoints/editsalamander.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/endpoints/editsalamander.py b/api/endpoints/editsalamander.py index 92b73f4..38f24a3 100644 --- a/api/endpoints/editsalamander.py +++ b/api/endpoints/editsalamander.py @@ -170,6 +170,7 @@ class EditSalamander(Resource): str(result)), path_to_original_image=original_path, path_to_processed_image=processed_path) + new_id = result else: new_id = add_salamander(salamander.id, image_id, data['new_location'], data['new_species'], @@ -211,7 +212,7 @@ def delete_growth_row(salamander_id, image_id): db.session.commit() -def handle_remaining_images(salamander, salamander_path: str, image_id: int, last_id: int, match_bool, result, new_id=0): +def handle_remaining_images(salamander, salamander_path: str, image_id: int, last_id: int, match_bool, result, new_id): # if last image was moved: if len(os.listdir(salamander_path)) == 0: os.rmdir(salamander_path) -- GitLab