Skip to content

Explicitly validate and cast dandiset ID during upload initialization #2649

@sentry

Description

@sentry

Sentry Issue: DANDI-API-R1

ValueError: invalid literal for int() with base 10: 'DANDI:000029'
  File "django/db/models/fields/__init__.py", line 2128, in get_prep_value
    return int(value)

ValueError: Field 'id' expected a number but got 'DANDI:000029'.
(18 additional frame(s) were not displayed)
...
  File "dandiapi/api/views/upload.py", line 135, in upload_initialize_view
    dandiset = get_object_or_404(

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions