fix --> non batch in tag distribution
This commit is contained in:
@@ -161,11 +161,12 @@ class TagDistributionSerializer(serializers.ModelSerializer):
|
||||
"""
|
||||
representation = super().to_representation(instance)
|
||||
|
||||
representation['batch'] = {
|
||||
'id': instance.batch.id,
|
||||
'batch_creator': instance.batch.organization.name,
|
||||
'batch_identity': instance.batch.batch_identity
|
||||
}
|
||||
if instance.batch:
|
||||
representation['batch'] = {
|
||||
'id': instance.batch.id,
|
||||
'batch_creator': instance.batch.organization.name,
|
||||
'batch_identity': instance.batch.batch_identity
|
||||
}
|
||||
|
||||
representation['assigner_org'] = {
|
||||
'id': instance.assigner_org.id,
|
||||
|
||||
Reference in New Issue
Block a user