elixir-cloud-aai / trs-filer

Lightweight, flexible Flask/Gunicorn-based GA4GH TRS implementation
Apache License 2.0
8 stars 6 forks source link

Registering multiple versions without identifiers returns Bad Request #81

Closed uniqueg closed 4 years ago

uniqueg commented 4 years ago

Registering more than one version without an identifier will result in a BadRequest response due to the code here:

            version_list = [v.get('id', None) for v in self.data['versions']]
            if len(version_list) != len(set(version_list)):
                logger.error("Duplicate tool version IDs specified.")
                raise BadRequest

None values should be excluded from before comparing the list length to the set length.