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
1 changed files with 5 additions and 0 deletions

View File

@ -47,3 +47,8 @@ class DeliverynoteView(View):
setattr(dlvnote, key, value)
db.session.commit()
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)