AttributeError when updating or deleting a transcription without a source
Sentry Issue: ARKINDEX-BACKEND-4Z
AttributeError: 'NoneType' object has no attribute 'slug'
(7 additional frame(s) were not displayed)
...
File "rest_framework/views.py", line 502, in dispatch
response = handler(request, *args, **kwargs)
File "rest_framework/generics.py", line 291, in delete
return self.destroy(request, *args, **kwargs)
File "rest_framework/mixins.py", line 90, in destroy
instance = self.get_object()
File "rest_framework/generics.py", line 99, in get_object
self.check_object_permissions(self.request, obj)
File "arkindex/documents/api/ml.py", line 114, in check_object_permissions
Missing check here: https://gitlab.com/arkindex/backend/-/blob/bcb65c51c116a13a71b636199539ab2596c8249b/arkindex/documents/api/ml.py#L114