bugfix: restriction delete lot by the owner

This commit is contained in:
Cayo Puigdefabregas 2021-06-02 10:11:20 +02:00
parent 57c9269907
commit 20e029b359
1 changed files with 1 additions and 1 deletions

View File

@ -109,7 +109,7 @@ class LotView(View):
return query return query
def delete(self, id): def delete(self, id):
lot = Lot.query.filter_by(id=id,).one() lot = Lot.query.filter_by(id=id, owner=g.user).one()
lot.delete() lot.delete()
db.session.commit() db.session.commit()
return Response(status=204) return Response(status=204)