feat: 通过django settings延迟获取BASE_PROJECT_CODE
This commit is contained in:
parent
f4bb1d952f
commit
ee7908f6bc
|
@ -5,7 +5,7 @@ from apps.inm.models import MIOItem
|
|||
from apps.qm.models import FtestWork
|
||||
from django.utils import timezone
|
||||
from datetime import datetime
|
||||
from server.conf import BASE_PROJECT_CODE
|
||||
from django.conf import settings
|
||||
import json
|
||||
from apps.utils.tools import MyJSONEncoder
|
||||
import decimal
|
||||
|
@ -17,6 +17,7 @@ def get_alldata_with_batch_and_store(batch: str):
|
|||
获取某个批次的整体生产数据并保存
|
||||
"""
|
||||
need_update = False
|
||||
BASE_PROJECT_CODE = getattr(settings, "BASE_PROJECT_CODE", None)
|
||||
if BASE_PROJECT_CODE == "gzerp":
|
||||
need_update = True
|
||||
last_time, data = get_alldata_with_batch(batch)
|
||||
|
|
Loading…
Reference in New Issue