From 1babbdc6181eb66bae71f83a6ad953bffcc53a10 Mon Sep 17 00:00:00 2001 From: AaronStephenson Date: Fri, 10 May 2019 13:40:18 -0500 Subject: [PATCH] Update sample serializer to use updated related names --- lideservices/models.py | 2 +- lideservices/serializers.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lideservices/models.py b/lideservices/models.py index 8325ce5..bab76fa 100644 --- a/lideservices/models.py +++ b/lideservices/models.py @@ -517,7 +517,7 @@ class FinalConcentratedSampleVolume(HistoryModel): def final_concentrated_sample_volume_sci(self): return get_sci_val(self.final_concentrated_sample_volume) - sample = models.OneToOneField('Sample', models.CASCADE, related_name='finalconcentratedsamplevolumes') + sample = models.OneToOneField('Sample', models.CASCADE, related_name='finalconcentratedsamplevolume') concentration_type = models.ForeignKey( 'ConcentrationType', models.PROTECT, related_name='finalconcentratedsamplevolumes') final_concentrated_sample_volume = models.DecimalField( diff --git a/lideservices/serializers.py b/lideservices/serializers.py index 5cebf2e..a2f0696 100644 --- a/lideservices/serializers.py +++ b/lideservices/serializers.py @@ -480,8 +480,8 @@ def get_peg_neg_targets_extracted(self, obj): post_dilution_volume = NullableRStrip10DecimalField() aliquots = AliquotSerializer(many=True, read_only=True) peg_neg_targets_extracted = serializers.SerializerMethodField() - final_concentrated_sample_volume = FinalConcentratedSampleVolumeSerializer(read_only=True) - final_sample_mean_concentrations= FinalSampleMeanConcentrationSerializer(many=True, read_only=True) + finalconcentratedsamplevolume = FinalConcentratedSampleVolumeSerializer(read_only=True) + finalsamplemeanconcentrations = FinalSampleMeanConcentrationSerializer(many=True, read_only=True) class Meta: model = Sample @@ -494,7 +494,7 @@ class Meta: 'filter_born_on_date', 'filter_flag', 'secondary_concentration_flag', 'elution_notes', 'record_type', 'record_type_string', 'technician_initials', 'dissolution_volume', 'post_dilution_volume', 'peg_neg', 'samplegroups', 'analysisbatches', 'peg_neg_targets_extracted', 'final_concentrated_sample_volume', - 'final_sample_mean_concentrations', 'aliquots', + 'finalsamplemeanconcentrations', 'aliquots', 'created_date', 'created_by', 'modified_date', 'modified_by',)