修复:补齐测试批次恢复锁定
This commit is contained in:
@@ -304,6 +304,7 @@ class FillingService:
|
||||
test_scope: TestBatchScope,
|
||||
) -> CrudResponseModel:
|
||||
try:
|
||||
await TestBatchAccessService.lock_active_batch(query_db, test_scope)
|
||||
warehouse_ids = await cls._warehouse_scope(query_db, current_user)
|
||||
if warehouse_ids is not None and page_object.warehouse_id not in warehouse_ids:
|
||||
raise PermissionException(data='', message='无权访问该仓库')
|
||||
@@ -509,7 +510,7 @@ class FillingService:
|
||||
request_hash=request_hash,
|
||||
test_batch_id=test_scope.batch_id,
|
||||
)
|
||||
await InventoryDao.add_event(query_db, inventory, event)
|
||||
await InventoryDao.add_event(query_db, inventory, event, test_scope)
|
||||
await query_db.commit()
|
||||
return cls._success(filling_id)
|
||||
except IntegrityError:
|
||||
|
||||
Reference in New Issue
Block a user