def validate(self, data):
        if 'filterfield_set' in data:
            for filter_field_data in data['filterfield_set']:
                filter_field = FilterField()
                for key, value in filter_field_data.items():
                    setattr(filter_field, key, value)
                filter_field.clean()
                filter_field_data['filter_value'] = filter_field.filter_value
        return data
dataset/ETHPy150Open burke-software/django-report-builder/report_builder/api/serializers.py/ReportNestedSerializer.validate/original