Skip to content
Snippets Groups Projects
Commit e3aa870f authored by Eirik Martin Danielsen's avatar Eirik Martin Danielsen :speech_balloon:
Browse files

more fixes

parent 0509cabf
No related branches found
No related tags found
1 merge request!37Resolve "rematch function and endpoint"
......@@ -88,7 +88,7 @@ class SalamanderClass(Resource):
growth_row.length = sanitize_number_str(str(data['length']))
db.session.commit()
if "location" in data and "new_location" in data and "new_sex" in data \
and "new_species" in data and data['location'] != data['new_location']:
and "new_species" in data and (data['location'] != data['new_location'] and data['sex'] != data['new_sex']):
salamander_path = os.path.join("images", data['location'], salamander.species, salamander.sex,
str(salamander.id))
new_path_to_images = os.path.join("images", data['new_location'], data['new_species'],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment