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)}" )