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