

def get_value(self, dictionary):
    values = dictionary.get(self.source, None)
    if (not isinstance(values, list)):
        values = [values]
    if all((isinstance(value, UploadedFile) for value in values)):
        return [{
            'file': value,
        } for value in values]
    return super(FileListSerializer, self).get_value(dictionary)

dataset/ETHPy150Open wq/wq.db/patterns/file/serializers.py FileListSerializer.get_value/original