change alot of things

This commit is contained in:
behruz-dev
2025-11-14 17:06:57 +05:00
parent 204c39445e
commit 180c59b338

View File

@@ -15,13 +15,7 @@ token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL2JhY2tlbmQuYX
headers = {"Authorization": f"Bearer {token}"} headers = {"Authorization": f"Bearer {token}"}
# def get_data(page):
# url = f"https://backend.app.uyqur.uz/main/supply/order-view?size=1000&page={page}"
# response = requests.get(url, headers=headers)
# if response.status_code == 200:
# return response.json()
# print(response.json())
class Command(BaseCommand): class Command(BaseCommand):
@@ -60,7 +54,7 @@ class Command(BaseCommand):
if parse_date(data["payment_date"]) if parse_date(data["payment_date"])
else parse_date(data["ordered_date"]) else parse_date(data["ordered_date"])
), ),
"status": statuses.get(data["status"].lower()), "status": statuses.get(data["status"].lower()) or 'NEW',
"payment_percentage": data["payment_percent"], "payment_percentage": data["payment_percent"],
"process": data["percent"], "process": data["percent"],
}, },