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

remove directory as well

parent 2a100411
No related branches found
No related tags found
1 merge request!38Resolve "remove dead code and cleanup"
......@@ -58,6 +58,7 @@ class LocationEndpoint(Resource):
if location:
db.session.delete(location)
db.session.commit()
os.rmdir(os.path.abspath("./images/" + location.name))
return jsonify({"message": location.name + " deleted.", "status": 200})
else:
return jsonify({"message": "location doesn't exist", "status": 400})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment