On 7/21/24 13:39, steve.bachinsky@tena-sda.org wrote:
In the case of adding a moderator based on an email address, it is unclear whether there is already a user associated with that email address or not. So I tried to use the "moderator = user_manager.make_user(email)" interface. However, when trying to use "mlist.subscribe(moderator, MemberRole.moderator)", I get an error that User must have preferred address. And while I can set "moderator.preferred_address = email", I then get error that there is no attribute "verified_on", and I can't set that on the User.
moderator.preferred_address needs to be set to an Address object, not an email. I.e.
moderator.preferred_address = user_manager.get_address(email)
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan