AttributeError: 'NoneType' object has no attribute 'read'
https://sentry.softwareheritage.org/organizations/swh/issues/104787/?referrer=phabricator_plugin
AttributeError: 'NoneType' object has no attribute 'read'
(7 additional frame(s) were not displayed)
...
File "rest_framework/views.py", line 492, in dispatch
response = handler(request, *args, **kwargs)
File "swh/deposit/api/common.py", line 1153, in post
request, headers, collection_name, deposit
File "swh/deposit/api/collection.py", line 138, in process_post
receipt = self._multipart_upload(req, headers, collection_name, deposit)
File "swh/deposit/api/common.py", line 598, in _multipart_upload
data["application/atom+xml"]
File "swh/deposit/api/common.py", line 508, in _read_metadata
raw_metadata = metadata_stream.read()
happens because application/xml+atom
was provided instead of application/atom+xml
.
Migrated from T4622 (view on Phabricator)