fix
This commit is contained in:
@@ -20,7 +20,6 @@ class Command(BaseCommand):
|
|||||||
with open(file_path, 'r', encoding='utf-8') as f:
|
with open(file_path, 'r', encoding='utf-8') as f:
|
||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
|
|
||||||
statuses = set()
|
|
||||||
|
|
||||||
for item in data['data']['data']:
|
for item in data['data']['data']:
|
||||||
product_name = item['product']['name']['uz']
|
product_name = item['product']['name']['uz']
|
||||||
@@ -55,8 +54,6 @@ class Command(BaseCommand):
|
|||||||
created_at=created_at,
|
created_at=created_at,
|
||||||
date=delivery_date
|
date=delivery_date
|
||||||
)
|
)
|
||||||
statuses.add(item['status'].upper())
|
|
||||||
# break
|
# break
|
||||||
|
|
||||||
self.stdout.write(self.style.SUCCESS("Orders imported successfully ✅"))
|
self.stdout.write(self.style.SUCCESS("Orders imported successfully ✅"))
|
||||||
self.stdout.write(f"Statuslar: {statuses}")
|
|
||||||
@@ -63,7 +63,6 @@ class Command(BaseCommand):
|
|||||||
"process": data["percent"],
|
"process": data["percent"],
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
statuses.add(data["status"].upper())
|
|
||||||
orders = []
|
orders = []
|
||||||
total_price = 0
|
total_price = 0
|
||||||
paid_amount = 0
|
paid_amount = 0
|
||||||
@@ -117,4 +116,3 @@ class Command(BaseCommand):
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
self.stdout.write("Parties added")
|
self.stdout.write("Parties added")
|
||||||
self.stdout.write(f"Statuslar: {statuses}")
|
|
||||||
Reference in New Issue
Block a user