Skip to content

Error in logic handling the values of validate_types.Severity #1621

@candleindark

Description

@candleindark

#1514 expanded the number of enum values in validate_types.Severity from 3 to 5, and made validate_types.Severity inherit from IntEnum instead of Enum. However, some existing logic still treats validate_types.Severity as having only three values and take these values discretely, such as:

dandi-cli/dandi/upload.py

Lines 265 to 267 in a774355

validation_errors = [
s for s in validation_statuses if s.severity == Severity.ERROR
]

Code snippet above should be corrected to the following

                    validation_errors = [
                        s
                        for s in validation_statuses
                        if s.severity is not None and s.severity >= Severity.ERROR
                    ]

Make needed corrections in the logic handling values of validate_types.Severity.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingreleased

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions