Describe the bug
Given that I'm an administrator, When I go to a Proposal which author is a Meeting, I see an exception (error 500)
To Reproduce
- Sign in as admin
- Go to a Proposal whose author is a Meeting
- See exception
Expected behavior
To not see the exception
Screenshots

Stacktrace
ActionView::Template::Error (undefined method `nickname' for #<Decidim::Meetings::Meeting
id: 4, title: {"ca"=>"Rerum sit.", "en"=>"Et assumenda.", "machine_translations"=>{"es"=>"
Impedit voluptas."}}, description: {"ca"=>"<p>Sapiente aut est. Hic velit rem. Architecto
sint ad.</p>", "en"=>"<p>Repellendus enim deleniti. Esse blanditiis ipsam. Animi sed quae.
</p>", "machine_translations"=>{"es"=>"<p>Corporis quidem numquam. Rerum sequi ipsam. Reru
m blanditiis aut.</p>"}}, start_time: "2022-11-27 00:00:00.000000000 +0000", end_time: "20
22-12-11 00:00:00.000000000 +0000", address: "249 Fredrick Creek 44215-2342 Hyattville", l
ocation: {"ca"=>"Minus architecto doloremque quod.", "en"=>"Blanditiis animi maiores iste.
", "machine_translations"=>{"es"=>"Voluptas quia nesciunt distinctio."}}, location_hints:
{"ca"=>"Ut adipisci officiis et.", "en"=>"Soluta sint rerum aut.", "machine_translations"=
>{"es"=>"Enim qui vel velit."}}, decidim_component_id: 2, decidim_author_id: 1, decidim_sc
ope_id: 15, created_at: "2023-03-23 08:50:48.013446000 +0000", updated_at: "2023-03-23 08:
50:48.013446000 +0000", closing_report: nil, attendees_count: nil, contributions_count: ni
l, attending_organizations: nil, closed_at: nil, latitude: -25.938174657312217, longitude:
-59.05842033121485, reference: "DVM-MEET-2023-03-4", registrations_enabled: false, availa
ble_slots: 20, registration_terms: {"ca"=>"<p>Est suscipit minima. Optio dolorem corporis.
Id quas sunt.</p>", "en"=>"<p>Et quam eveniet. Ipsa a quo. Exercitationem voluptatibus as
pernatur.</p>", "machine_translations"=>{"es"=>"<p>At et ea. Quia aut quo. Et tenetur ad.<
/p>"}}, reserved_slots: 0, private_meeting: false, transparent: true, registration_form_en
abled: false, decidim_author_type: "Decidim::Organization", decidim_user_group_id: nil, co
mments_count: 0, online_meeting_url: "http://example.org", type_of_meeting: "hybrid", regi
stration_type: "registration_disabled", registration_url: nil, salt: "445f6366735923926ee9
f31c733802d84e02a1b787491b1222...", customize_registration_email: false, registration_email_custom_content: nil, follows_count: 0, published_at: nil, video_url: nil, audio_url: nil
, closing_visible: nil, comments_enabled: true, comments_start_time: nil, comments_end_tim
e: nil, state: nil, iframe_access_level: "all", iframe_embed_type: "none">):
138:
139: <%= comments_for @proposal %>
140:
141: <%= cell("decidim/flag_modal", @proposal) %>
activemodel (6.1.7.2) lib/active_model/attribute_methods.rb:469:in `method_missing'
/home/apereira/Work/decidim/decidim/decidim-core/app/cells/decidim/flag_modal/show.erb:25:
in `block in __tilt_149360'
cells-erb (0.1.0) lib/cell/erb/template.rb:14:in `capture'
actionview (6.1.7.2) lib/action_view/helpers/form_helper.rb:450:in `form_for'
/home/apereira/Work/decidim/decidim/decidim-core/app/helpers/decidim/decidim_form_helper.r
b:34:in `decidim_form_for'
/home/apereira/Work/decidim/decidim/decidim-core/app/cells/decidim/flag_modal/show.erb:12:
in `__tilt_149360'
Extra data
- Decidim Version: 0.28.0.dev
Additional context
The line that gives the exception is
|
<div class="callout secondary"><%= t("decidim.shared.flag_modal.visit_profile", user_link: link_to(author&.nickname, link_to_profile)) %></div> |
This was introduced on #10024
Even though the Proposal has a Meeting as an Author, this Meeting doesn't have a nickname attribute.
We should make a spec for this case too.
Describe the bug
Given that I'm an administrator, When I go to a Proposal which author is a Meeting, I see an exception (error 500)
To Reproduce
Expected behavior
To not see the exception
Screenshots
Stacktrace
Extra data
Additional context
The line that gives the exception is
decidim/decidim-core/app/cells/decidim/flag_modal/show.erb
Line 25 in 5c5eda7
This was introduced on #10024
Even though the Proposal has a Meeting as an Author, this Meeting doesn't have a nickname attribute.
We should make a spec for this case too.