Unable to add co-matainers to packages
-
I have described the bug in complete detail in the Description section. -
I have specified steps in the Reproduction section. -
I have included any logs related to the bug in the Logs section. -
I have included the versions which are affected in the Version(s) section.
Description
Attempting to add a user as a co-maintainer of a package results in an internal server error.
Reproduction
Add a use as a co-maintainer via the Manage Co-Maintainers
button on a package page.
Logs
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py", line 373, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "/usr/lib/python3.9/site-packages/uvicorn/middleware/proxy_headers.py", line 75, in __call__
return await self.app(scope, receive, send)
File "/usr/lib/python3.9/site-packages/uvicorn/middleware/message_logger.py", line 82, in __call__
raise exc from None
File "/usr/lib/python3.9/site-packages/uvicorn/middleware/message_logger.py", line 78, in __call__
await self.app(scope, inner_receive, inner_send)
File "/usr/lib/python3.9/site-packages/fastapi/applications.py", line 208, in __call__
await super().__call__(scope, receive, send)
File "/usr/lib/python3.9/site-packages/starlette/applications.py", line 112, in __call__
await self.middleware_stack(scope, receive, send)
File "/usr/lib/python3.9/site-packages/starlette/middleware/errors.py", line 181, in __call__
raise exc
File "/usr/lib/python3.9/site-packages/starlette/middleware/errors.py", line 159, in __call__
await self.app(scope, receive, _send)
File "/usr/lib/python3.9/site-packages/starlette/middleware/sessions.py", line 77, in __call__
await self.app(scope, receive, send_wrapper)
File "/usr/lib/python3.9/site-packages/starlette/middleware/authentication.py", line 48, in __call__
await self.app(scope, receive, send)
File "/usr/lib/python3.9/site-packages/starlette/middleware/base.py", line 63, in __call__
response = await self.dispatch_func(request, call_next)
File "/aurweb/./aurweb/asgi.py", line 182, in id_redirect_middleware
return task.result()
File "/usr/lib/python3.9/site-packages/starlette/middleware/base.py", line 44, in call_next
raise app_exc
File "/usr/lib/python3.9/site-packages/starlette/middleware/base.py", line 34, in coro
await self.app(scope, request.receive, send_stream.send)
File "/usr/lib/python3.9/site-packages/starlette/middleware/base.py", line 63, in __call__
response = await self.dispatch_func(request, call_next)
File "/aurweb/./aurweb/asgi.py", line 162, in check_terms_of_service
return task.result()
File "/usr/lib/python3.9/site-packages/starlette/middleware/base.py", line 44, in call_next
raise app_exc
File "/usr/lib/python3.9/site-packages/starlette/middleware/base.py", line 34, in coro
await self.app(scope, request.receive, send_stream.send)
File "/usr/lib/python3.9/site-packages/starlette/middleware/base.py", line 63, in __call__
response = await self.dispatch_func(request, call_next)
File "/aurweb/./aurweb/asgi.py", line 120, in add_security_headers
response = response.result()
File "/usr/lib/python3.9/site-packages/starlette/middleware/base.py", line 44, in call_next
raise app_exc
File "/usr/lib/python3.9/site-packages/starlette/middleware/base.py", line 34, in coro
await self.app(scope, request.receive, send_stream.send)
File "/usr/lib/python3.9/site-packages/starlette/middleware/base.py", line 63, in __call__
response = await self.dispatch_func(request, call_next)
File "/usr/lib/python3.9/site-packages/prometheus_fastapi_instrumentator/instrumentation.py", line 172, in dispatch_middleware
raise e from None
File "/usr/lib/python3.9/site-packages/prometheus_fastapi_instrumentator/instrumentation.py", line 169, in dispatch_middleware
response = await call_next(request)
File "/usr/lib/python3.9/site-packages/starlette/middleware/base.py", line 44, in call_next
raise app_exc
File "/usr/lib/python3.9/site-packages/starlette/middleware/base.py", line 34, in coro
await self.app(scope, request.receive, send_stream.send)
File "/usr/lib/python3.9/site-packages/starlette/exceptions.py", line 82, in __call__
raise exc
File "/usr/lib/python3.9/site-packages/starlette/exceptions.py", line 71, in __call__
await self.app(scope, receive, sender)
File "/usr/lib/python3.9/site-packages/starlette/routing.py", line 656, in __call__
await route.handle(scope, receive, send)
File "/usr/lib/python3.9/site-packages/starlette/routing.py", line 259, in handle
await self.app(scope, receive, send)
File "/usr/lib/python3.9/site-packages/starlette/routing.py", line 61, in app
response = await func(request)
File "/usr/lib/python3.9/site-packages/fastapi/routing.py", line 226, in app
raw_response = await run_endpoint_function(
File "/usr/lib/python3.9/site-packages/fastapi/routing.py", line 159, in run_endpoint_function
return await dependant.call(**values)
File "/aurweb/./aurweb/auth/__init__.py", line 145, in wrapper
return await func(request, *args, **kwargs)
File "/aurweb/./aurweb/routers/packages.py", line 516, in package_base_comaintainers_post
users.remove(str()) # Remove any empty strings from the set.
KeyError: ''
Version(s)
Edited by Hunter Wittenborn