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):

After Change


        unprocessed_samples = Sample.public_objects.filter(
            accession_code__in=accessions, is_processed=False
        )
        if unprocessed_samples.count() > 0:
            raise serializers.ValidationError(
                "Non-downloadable sample(s) ""
                + ", ".join([s.accession_code for s in unprocessed_samples])
                + "" in dataset"
            )


class CreateDatasetSerializer(serializers.ModelSerializer):
    class Meta:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

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: MTG/freesound
Commit Name: 0f7bacc26eec44c9f00f5d7666c1f87f0e051ce2
Time: 2017-11-10
Author: andres.ferraro@upf.edu
File Name: search/management/commands/post_dirty_sounds_to_solr.py
Class Name: Command
Method Name: handle


Project Name: MTG/freesound
Commit Name: 0f7bacc26eec44c9f00f5d7666c1f87f0e051ce2
Time: 2017-11-10
Author: andres.ferraro@upf.edu
File Name: search/management/commands/reindex_solr.py
Class Name: Command
Method Name: handle