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))