fix --> batch_identity Nonetype in distribution batch
This commit is contained in:
@@ -202,7 +202,7 @@ class TagDistributionBatchSerializer(serializers.ModelSerializer):
|
||||
representation['distributions'] = [{
|
||||
'id': dist.id,
|
||||
'dist_identity': dist.dist_identity,
|
||||
'batch_identity': dist.batch.batch_identity,
|
||||
'batch_identity': dist.batch.batch_identity if dist.batch else None,
|
||||
'species_code': dist.species_code,
|
||||
'distributed_number': dist.distributed_number,
|
||||
'serial_from': dist.batch.serial_from if dist.batch else None,
|
||||
|
||||
Reference in New Issue
Block a user