Commit f732dbe6 authored by Eirik Martin Danielsen's avatar Eirik Martin Danielsen 💬
Browse files

Merge branch '35-remove-dead-code-and-cleanup' of...

Merge branch '35-remove-dead-code-and-cleanup' of https://git.gvk.idi.ntnu.no/HermanDyrkorn/salamander-api into 35-remove-dead-code-and-cleanup

fix remove dir
parents 66261209 b7e970a5
......@@ -23,7 +23,6 @@ class SalamandersEndpoint(Resource):
for salamander in salamanders:
number_of_images = db.session.query(SalamanderGrowth).filter_by(salamander_id=salamander.id).all()
last_date = db.session.query(SalamanderGrowth).filter_by(salamander_id=salamander.id).order_by(SalamanderGrowth.date.desc()).first()
print(last_date)
ret = {"id": salamander.id, "sex": salamander.sex, "individuals": len(number_of_images), "species": salamander.species, "date": last_date.date}
salamander_list.append(ret)
return jsonify({"salamanders": salamander_list, 'status': 200})
......
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