From f5b2f3c2f6a401e25640617b574ddf4648d03938 Mon Sep 17 00:00:00 2001 From: yiorgos marinellis Date: Wed, 4 Mar 2020 17:44:58 +0100 Subject: [PATCH] Add GET a deliverynote by id --- ereuse_devicehub/resources/deliverynote/views.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ereuse_devicehub/resources/deliverynote/views.py b/ereuse_devicehub/resources/deliverynote/views.py index 4a390381..ae3e56d3 100644 --- a/ereuse_devicehub/resources/deliverynote/views.py +++ b/ereuse_devicehub/resources/deliverynote/views.py @@ -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)