From 8a501c268162db26fd9bc0567d095eb9bb573264 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 8 May 2025 15:13:04 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20batchst=E6=B7=BB=E5=8A=A0=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E5=B9=B6=E6=9B=B4=E6=96=B0=E5=85=89=E5=AD=90=E7=9A=84?= =?UTF-8?q?=E7=BB=9F=E8=AE=A12?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/services_2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/wpm/services_2.py b/apps/wpm/services_2.py index f965c7c5..6e7fedf9 100644 --- a/apps/wpm/services_2.py +++ b/apps/wpm/services_2.py @@ -28,7 +28,7 @@ def get_alldata_with_batch_and_store(batch: str): if data: if action == "get_or_create": - bobj, _ = BatchSt.objects.get_or_create(batch=batch) + bobj, _ = BatchSt.objects.get_or_create(batch=batch, version=1) elif action == "get": bobj = BatchSt.objects.get(batch=batch, version=1) bobj.data = json.loads(json.dumps(data, cls=MyJSONEncoder))