From 19c182c54359086a87e341ceab581c830a24d930 Mon Sep 17 00:00:00 2001 From: PhanThanhTrung Date: Wed, 13 Mar 2024 13:17:47 +0700 Subject: [PATCH] update --- cope2n-api/fwd_api/api/accuracy_view.py | 2 +- cope2n-api/fwd_api/api/ctel_view.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cope2n-api/fwd_api/api/accuracy_view.py b/cope2n-api/fwd_api/api/accuracy_view.py index b8fa200..787abae 100755 --- a/cope2n-api/fwd_api/api/accuracy_view.py +++ b/cope2n-api/fwd_api/api/accuracy_view.py @@ -408,7 +408,7 @@ class AccuracyViewSet(viewsets.ViewSet): data = [] for report in page: - acc_keys = ["purchase_date", "retailername", "imei_number", "avg"] + acc_keys = ["purchase_date", "retailername", "invoice_no", "imei_number", "avg"] acc = {} for key in acc_keys: fb = report.feedback_accuracy.get(key, 0) if report.feedback_accuracy else 0 diff --git a/cope2n-api/fwd_api/api/ctel_view.py b/cope2n-api/fwd_api/api/ctel_view.py index 91816fe..593613c 100755 --- a/cope2n-api/fwd_api/api/ctel_view.py +++ b/cope2n-api/fwd_api/api/ctel_view.py @@ -320,6 +320,9 @@ class CtelViewSet(viewsets.ViewSet): 'retailername': { 'type': 'string', }, + 'invoice_no': { + 'type': 'string', + }, 'sold_to_party': { 'type': 'string', }, @@ -336,7 +339,7 @@ class CtelViewSet(viewsets.ViewSet): } }, }, - 'required': ['request_id', 'retailername', 'sold_to_party', 'purchase_date', 'imei_number'] + 'required': ['request_id', 'retailername', 'invoice_no', 'sold_to_party', 'purchase_date', 'imei_number'] } }, responses=None, tags=['OCR']) @action(detail=False, url_path="images/feedback", methods=["POST"])