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

Fixbug:filter-workflow
This commit is contained in:
hungdztrau123 2024-06-03 13:31:20 +07:00 committed by GitHub
commit 63223e0ddf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 19 deletions

16
.env
View File

@ -1,15 +1,15 @@
COMPOSE_PROJECT_NAME=paperless COMPOSE_PROJECT_NAME=paperless
PAPERLESS_DEBUG=true PAPERLESS_DEBUG=true
# PAPERLESS_REDIS=redis://localhost:6379 PAPERLESS_REDIS=redis://localhost:6379
PAPERLESS_REDIS=redis://:@123bytech@172.16.100.203:9377 # PAPERLESS_REDIS=redis://:@123bytech@172.16.100.203:9377
PAPERLESS_DBHOST=172.16.100.203 # PAPERLESS_DBHOST=172.16.100.203
PAPERLESS_DBPORT=5432 # PAPERLESS_DBPORT=5432
PAPERLESS_DBNAME=tc_edoc # PAPERLESS_DBNAME=tc_edoc
PAPERLESS_DBUSER=tc_edoc # PAPERLESS_DBUSER=tc_edoc
PAPERLESS_DBPASS=27M2MV58Re2Y # PAPERLESS_DBPASS=27M2MV58Re2Y
PAPERLESS_DBSSLMODE=prefer # PAPERLESS_DBSSLMODE=prefer
URL_UPLOAD_FILE=https://ocr-core-api.tcgroup.vn/api/v1/file/upload URL_UPLOAD_FILE=https://ocr-core-api.tcgroup.vn/api/v1/file/upload

View File

@ -380,15 +380,6 @@ def existing_document_matches_workflow(
) )
trigger_matched = False trigger_matched = False
# Document warehouse vs trigger has_warehouse
if (
trigger.filter_has_warehouse is not None
and document.warehouse != trigger.filter_has_warehouse
):
reason = (
f"Document warehouse {document.warehouse} does not match {trigger.filter_has_warehouse}",
)
trigger_matched = False
# Document document_type vs trigger has_document_type # Document document_type vs trigger has_document_type
if ( if (

View File

@ -1537,7 +1537,6 @@ class WorkflowTriggerSerializer(serializers.ModelSerializer):
"filter_has_tags", "filter_has_tags",
"filter_has_correspondent", "filter_has_correspondent",
"filter_has_document_type", "filter_has_document_type",
"filter_has_warehouse",
] ]
def validate(self, attrs): def validate(self, attrs):