Delete First

Brightcells 5 年 前
コミット
df8adeba18
共有1 個のファイルを変更した3 個の追加0 個の削除を含む
  1. 3 0
      commands/management/commands/sale.py

+ 3 - 0
commands/management/commands/sale.py

@@ -32,6 +32,9 @@ class Command(CompatibilityBaseCommand):
32 32
         brands = BrandInfo.objects.filter(status=True)
33 33
 
34 34
         for b in brands:
35
+            SalesResponsibilityInfoModelsSaleStatisticInfo.objects.filter(brand_id=b.brand_id, ymd=day).delete()
36
+            SuperSalesResponsibilityInfoModelsSaleStatisticInfo.objects.filter(brand_id=b.brand_id, ymd=day).delete()
37
+
35 38
             distributors = DistributorInfo.objects.filter(brand_id=b.brand_id, status=True)
36 39
             models = ModelInfo.objects.filter(brand_id=b.brand_id, status=True)
37 40
             for d in distributors: