From e8d5de7fe5bb2655a11dd7a977b67a9dad6a2c2d Mon Sep 17 00:00:00 2001 From: Jan Grzegorzewski Date: Sun, 20 Dec 2020 17:59:14 +0100 Subject: [PATCH] debug --- backend/pkdb_app/outputs/serializers.py | 4 ++-- backend/pkdb_app/subjects/serializers.py | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/backend/pkdb_app/outputs/serializers.py b/backend/pkdb_app/outputs/serializers.py index 76cc3cde..6ae32488 100644 --- a/backend/pkdb_app/outputs/serializers.py +++ b/backend/pkdb_app/outputs/serializers.py @@ -19,7 +19,7 @@ CommentElasticSerializer from ..interventions.models import Intervention from ..serializers import ( - ExSerializer, StudySmallElasticSerializer, SidNameLabelSerializer, PKField) + ExSerializer, StudySmallElasticSerializer, SidNameLabelSerializer) from ..subjects.models import Group, DataFile, Individual from ..subjects.serializers import ( EXTERN_FILE_FIELDS, GroupSmallElasticSerializer, IndividualSmallElasticSerializer) @@ -63,7 +63,7 @@ class OutputSerializer(MeasurementTypeableSerializer): required=False, allow_null=True, ) - interventions = PKField( + interventions = serializers.PrimaryKeyRelatedField( queryset=Intervention.objects.all(), many=True, required=True, allow_null=True) diff --git a/backend/pkdb_app/subjects/serializers.py b/backend/pkdb_app/subjects/serializers.py index 2d12099e..30367aca 100644 --- a/backend/pkdb_app/subjects/serializers.py +++ b/backend/pkdb_app/subjects/serializers.py @@ -92,9 +92,7 @@ def validate_count(count): raise serializers.ValidationError(f"count <{count}> has to be greater or equal to 1. ") return count - def validate(self, attrs): - try: # perform via dedicated function on categorials for info_node in ['substance', 'measurement_type']: