fix:remove-warehouses

This commit is contained in:
hungdztrau123 2024-06-03 11:51:40 +07:00
parent bde930a453
commit 855b0a6115
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