From c5b87e8591bb39be79df47e3fb11ba1c63983f76 Mon Sep 17 00:00:00 2001 From: Mojtaba-z Date: Mon, 2 Feb 2026 12:09:31 +0330 Subject: [PATCH] fix --> batch identity bug in create distribution from ditribute --- apps/tag/services/tag_distribution_services.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/tag/services/tag_distribution_services.py b/apps/tag/services/tag_distribution_services.py index 67ef4e8..067ae5b 100644 --- a/apps/tag/services/tag_distribution_services.py +++ b/apps/tag/services/tag_distribution_services.py @@ -186,7 +186,9 @@ class TagDistributionService: parent_tag_distribution = TagDistribution.objects.get( id=dist_data['parent_tag_distribution'] ) - batch = TagBatch.objects.get(batch_identity=dist_data.get('batch_identity')) + batch = TagBatch.objects.get( + batch_identity=dist_data.get('batch_identity') + ) if dist_data.get('batch_identity') else None tags = Tag.objects.filter( distributions__tag_distribution_batch=parent_batch, @@ -221,7 +223,7 @@ class TagDistributionService: assigner_org=org, assigned_org=assigned_org, total_tag_count=total_counted_tags, - distribution_type='batch', + distribution_type=parent_batch.distribution_type, dist_batch_identity=generate_unique_code( f"{random.randint(1000, 9999)}" )