From 771f6de93a26b7c38a85b6cb280c29e49e09c863 Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 17 Mar 2022 23:56:48 +0100 Subject: [PATCH] [BUG] ValueError on Part page Fixes #2756 --- InvenTree/part/views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/InvenTree/part/views.py b/InvenTree/part/views.py index 4b1e0eca33..e3006ff525 100644 --- a/InvenTree/part/views.py +++ b/InvenTree/part/views.py @@ -441,9 +441,9 @@ class PartDetail(InvenTreeRoleMixin, DetailView): # set date for graph labels if stock_item.purchase_order and stock_item.purchase_order.issue_date: - line['date'] = stock_item.purchase_order.issue_date.strftime('%d.%m.%Y') + line['date'] = stock_item.purchase_order.issue_date.isoformat() elif stock_item.tracking_info.count() > 0: - line['date'] = stock_item.tracking_info.first().date.strftime('%d.%m.%Y') + line['date'] = stock_item.tracking_info.first().date.isoformat() else: # Not enough information continue @@ -500,9 +500,9 @@ class PartDetail(InvenTreeRoleMixin, DetailView): # set date for graph labels if sale_item.order.issue_date: - line['date'] = sale_item.order.issue_date.strftime('%d.%m.%Y') + line['date'] = sale_item.order.issue_date.isoformat() elif sale_item.order.creation_date: - line['date'] = sale_item.order.creation_date.strftime('%d.%m.%Y') + line['date'] = sale_item.order.creation_date.isoformat() else: line['date'] = _('None')