a971f44300932557e9a806c991c5e81eedf62e4e,api/data_refinery_api/serializers.py,,validate_dataset,#Any#,594

Before Change



    if len(accessions) > 0:
        processed_samples = Sample.processed_objects.filter(accession_code__in=accessions)
        if len(accessions) != processed_samples.count():
            raise serializers.ValidationError("Non-downloadable samples in " + str(accessions))


class CreateDatasetSerializer(serializers.ModelSerializer):
    class Meta:
        model = Dataset
        fields = ("id", "data", "email_address", "email_ccdl_ok")

After Change


        if unprocessed_samples.count() > 0:
            raise serializers.ValidationError(
                "Non-downloadable sample(s) ""
                + ", ".join([s.accession_code for s in unprocessed_samples])
                + "" in dataset"
            )
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: AlexsLemonade/refinebio
Commit Name: a971f44300932557e9a806c991c5e81eedf62e4e
Time: 2020-06-16
Author: willvauclain.dev@gmail.com
File Name: api/data_refinery_api/serializers.py
Class Name:
Method Name: validate_dataset


Project Name: bokeh/bokeh
Commit Name: 72c46671aa6bafb4c885ce9c84e098463499d50d
Time: 2016-02-20
Author: sarah@bonvaya.com
File Name: tests/examples/collect_examples.py
Class Name:
Method Name: get_file_examples


Project Name: comic/grand-challenge.org
Commit Name: e8bafba0d6a342e0a6de13f4ca05b71a111f22e1
Time: 2018-10-18
Author: jamesmeakin@gmail.com
File Name: app/grandchallenge/core/views.py
Class Name:
Method Name: comicmain