Describe the bug
When you delete a user account, its space user roles are not destroyed. If a user has a role in a participatory space that has roles (processes, assemblies, conferences) and the account has been deleted, then visiting the roles page for that space gives an error:
<my_host>/admin/assemblies/<my_assembly>/user_roles
ActionView::Template::Error (undefined method `name' for nil:NilClass):
25: <% @assembly_user_roles.each do |role| %>
26: <tr>
27: <td>
28: <%= role.user.name %><br>
29: </td>
30: <td>
31: <%= role.user.email %><br>
vendor/bundle/ruby/2.6.0/gems/decidim-assemblies-0.20.0/app/views/decidim/assemblies/admin/assembly_user_roles/index.html.erb:28:in `block in _44aa524d36d692477b09cc7cd96f16d5'
Expected behavior
No user roles should be left with that user.
Screenshots
None
Stacktrace
See above
Extra data (please complete the following information):
- Decidim Version: 0.20, I suspect this happens in master too.
Describe the bug
When you delete a user account, its space user roles are not destroyed. If a user has a role in a participatory space that has roles (processes, assemblies, conferences) and the account has been deleted, then visiting the roles page for that space gives an error:
Expected behavior
No user roles should be left with that user.
Screenshots
None
Stacktrace
See above
Extra data (please complete the following information):