Commit 3724d2c8 authored by andmag's avatar andmag
Browse files

fixed tiny bug in match for rematch

parent 34005d63
...@@ -170,6 +170,7 @@ class EditSalamander(Resource): ...@@ -170,6 +170,7 @@ class EditSalamander(Resource):
str(result)), str(result)),
path_to_original_image=original_path, path_to_original_image=original_path,
path_to_processed_image=processed_path) path_to_processed_image=processed_path)
new_id = result
else: else:
new_id = add_salamander(salamander.id, image_id, data['new_location'], new_id = add_salamander(salamander.id, image_id, data['new_location'],
data['new_species'], data['new_species'],
...@@ -211,7 +212,7 @@ def delete_growth_row(salamander_id, image_id): ...@@ -211,7 +212,7 @@ def delete_growth_row(salamander_id, image_id):
db.session.commit() 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 last image was moved:
if len(os.listdir(salamander_path)) == 0: if len(os.listdir(salamander_path)) == 0:
os.rmdir(salamander_path) os.rmdir(salamander_path)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment