Skip to content
This repository has been archived by the owner on Jul 18, 2023. It is now read-only.

Commit

Permalink
Update sample serializer to use updated related names
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronstephenson committed May 10, 2019
1 parent 224066a commit 1babbdc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lideservices/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
6 changes: 3 additions & 3 deletions lideservices/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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',)


Expand Down

0 comments on commit 1babbdc

Please sign in to comment.