From 2987853afb4b564477d0d61a30426e79a3b0dddf Mon Sep 17 00:00:00 2001 From: caoqianming Date: Wed, 23 Apr 2025 12:42:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=80=9A=E8=BF=87django=20settings?= =?UTF-8?q?=E5=BB=B6=E8=BF=9F=E8=8E=B7=E5=8F=96BASE=5FPROJECT=5FCODE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/services_2.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/wpm/services_2.py b/apps/wpm/services_2.py index 9ff9241f..d2a25062 100644 --- a/apps/wpm/services_2.py +++ b/apps/wpm/services_2.py @@ -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)