Merge pull request #28 from tienthienhd/fixbug/delete-warehouse

fix:remove-warehouses
This commit is contained in:
Trần Minh Đức
2024-06-03 11:52:53 +07:00
committed by GitHub
2 changed files with 0 additions and 12 deletions

View File

@@ -77,7 +77,6 @@ class WorkflowTriggerPlugin(
.prefetch_related("actions__assign_custom_fields")
.prefetch_related("actions__remove_tags")
.prefetch_related("actions__remove_correspondents")
.prefetch_related("actions__remove_warehouses")
.prefetch_related("actions__remove_document_types")
.prefetch_related("actions__remove_storage_paths")
.prefetch_related("actions__remove_custom_fields")

View File

@@ -598,7 +598,6 @@ def run_workflow(
.prefetch_related("actions__assign_custom_fields")
.prefetch_related("actions__remove_tags")
.prefetch_related("actions__remove_correspondents")
.prefetch_related("actions__remove_warehouses")
.prefetch_related("actions__remove_document_types")
.prefetch_related("actions__remove_storage_paths")
.prefetch_related("actions__remove_custom_fields")
@@ -754,16 +753,6 @@ def run_workflow(
)
):
document.correspondent = None
if action.remove_all_warehouses or (
document.warehouse
and (
action.remove_warehouses.filter(
pk=document.warehouse.pk,
).exists()
)
):
document.warehouse = None
if action.remove_all_document_types or (
document.document_type