dandi / dandi/dandi-archive

ProtectedError: ("Cannot delete some instances of model 'Dandiset' because they are referenced through protected ...

Open
#993 5 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
26
Forks
21
Avg merge
5d 6h
Merged PRs (30d)
14

Description

Sentry Issue: [DANDI-API-6Q](https://sentry.io/organizations/dandiarchive/issues/3098704229/?referrer=github_integration)

```
ProtectedError: ("Cannot delete some instances of model 'Dandiset' because they are referenced through protected foreign keys: 'ZarrArchive.dandiset'.", {})
(8 additional frame(s) were not displayed)
...
File "django/utils/decorators.py", line 46, in _wrapper
return bound_method(*args, **kwargs)
File "guardian/decorators.py", line 124, in _wrapped_view
return view_func(request, *args, **kwargs)
File "dandiapi/api/views/dandiset.py", line 279, in destroy
dandiset.delete()
File "django/db/models/base.py", line 1093, in delete
collector.collect([self], keep_parents=keep_parents)
File "django/db/models/deletion.py", line 348, in collect
raise ProtectedError(
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.