From 7a88d9d730217f5f031594f1f467bf23982cb811 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 3 Feb 2021 22:06:27 +0100 Subject: [PATCH] change the name of lot with documentId --- ereuse_devicehub/resources/deliverynote/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ereuse_devicehub/resources/deliverynote/views.py b/ereuse_devicehub/resources/deliverynote/views.py index b22e999e..b9650b98 100644 --- a/ereuse_devicehub/resources/deliverynote/views.py +++ b/ereuse_devicehub/resources/deliverynote/views.py @@ -16,7 +16,7 @@ class DeliverynoteView(View): dn = request.get_json() dlvnote = Deliverynote(**dn) # Create a lot - lot_name = dlvnote.supplier_email + "_" + datetime.datetime.utcnow().strftime("%B-%d-%Y") + lot_name = dlvnote.document_id + "_" + datetime.datetime.utcnow().strftime("%B-%d-%Y") new_lot = Lot(name=lot_name) dlvnote.lot_id = new_lot.id db.session.add(new_lot)