Add GET a deliverynote by id

This commit is contained in:
yiorgos marinellis 2020-03-04 17:44:58 +01:00
parent fdd93b0941
commit f5b2f3c2f6

View file

@ -47,3 +47,8 @@ class DeliverynoteView(View):
setattr(dlvnote, key, value) setattr(dlvnote, key, value)
db.session.commit() db.session.commit()
return Response(status=204) return Response(status=204)
def one(self, id: uuid.UUID):
"""Get one delivery note"""
deliverynote = Deliverynote.query.filter_by(id=id).one() # type Deliverynote
return self.schema.jsonify(Deliverynote)