You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When upgrading to v12, non-confirmed users will fail to be confirmed, because of the domain column being null.
Expected behavior
User domain should be not required or otherwise an upgrade recipe should be created as part of upgrading to v12. The exact failure happens when the domain is being created automatically from the user.domainhere.
Additional context
Associated exception
TypeError: 'NoneType' object is not subscriptable
File "flask/app.py", line 2529, in wsgi_app
response = self.full_dispatch_request()
File "flask/app.py", line 1825, in full_dispatch_request
rv = self.handle_user_exception(e)
File "flask_cors/extension.py", line 176, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "flask/app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
File "flask/app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "flask_resources/resources.py", line 65, in view
return view_meth()
File "flask_resources/content_negotiation.py", line 116, in inner_content_negotiation
return f(*args, **kwargs)
File "flask_resources/parsers/decorators.py", line 51, in inner
return f(self, *args, **kwargs)
File "invenio_users_resources/resources/users/resource.py", line 140, in activate
self.service.activate(
File "invenio_records_resources/services/uow.py", line 350, in inner
res = f(self, *args, **kwargs)
File "invenio_users_resources/services/users/service.py", line 230, in activate
user.activate()
File "invenio_users_resources/records/api.py", line 247, in activate
return current_datastore.activate_user(user)
File "invenio_accounts/datastore.py", line 51, in activate_user
user_confirmed.send(current_app._get_current_object(), user=user)
File "blinker/base.py", line 307, in send
result = receiver(sender, **kwargs)
File "invenio_accounts/domains.py", line 22, in on_user_confirmed
domain = datastore.create_domain(user.domain)
File "invenio_accounts/datastore.py", line 123, in create_domain
return Domain.create(domain, **kwargs)
File "invenio_accounts/models.py", line 615, in create
obj = cls(
File "<string>", line 4, in __init__
File "sqlalchemy/orm/state.py", line 482, in _initialize_instance
manager.dispatch.init_failure(self, args, kwargs)
File "sqlalchemy/util/langhelpers.py", line 70, in __exit__
compat.raise_(
File "sqlalchemy/util/compat.py", line 211, in raise_
raise exception
File "sqlalchemy/orm/state.py", line 479, in _initialize_instance
return manager.original_init(*mixed[1:], **kwargs)
File "sqlalchemy/orm/decl_base.py", line 1200, in _declarative_constructor
setattr(self, k, kwargs[k])
File "sqlalchemy/ext/hybrid.py", line 938, in __set__
self.fset(instance, value)
File "invenio_accounts/models.py", line 634, in domain
if value[-1] == ".":
The text was updated successfully, but these errors were encountered:
Package version (if known): v12.0.0b3.x
Describe the bug
When upgrading to v12, non-confirmed users will fail to be confirmed, because of the
domain
column being null.Expected behavior
User domain should be not required or otherwise an upgrade recipe should be created as part of upgrading to v12. The exact failure happens when the domain is being created automatically from the
user.domain
here.Additional context
Associated exception
The text was updated successfully, but these errors were encountered: