bugfix: restriction delete lot by the owner
This commit is contained in:
parent
57c9269907
commit
20e029b359
|
@ -109,7 +109,7 @@ class LotView(View):
|
|||
return query
|
||||
|
||||
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()
|
||||
db.session.commit()
|
||||
return Response(status=204)
|
||||
|
|
Reference in a new issue