Verified Commit 703af642 authored by Kaspar Vollenweider's avatar Kaspar Vollenweider 👻
Browse files

guard the case when a group offer has a creator (actually responsible) that has no profile

parent d5201f18
Pipeline #23966 passed with stage
in 51 minutes and 46 seconds
......@@ -53,29 +53,29 @@ h4.m-b-10= t('assignment_pdf.responsible_title')
.col-xs-6
.row
.col-xs-3= t('assignment_pdf.last_name')
.col-xs-9.col-input= @group_assignment.creator.profile.contact.last_name
.col-xs-9.col-input= @group_assignment.creator.profile&.contact&.last_name
.row
.col-xs-3= t('assignment_pdf.address')
.col-xs-9.col-input= @group_assignment.creator.profile.contact.full_street
.col-xs-9.col-input= @group_assignment.creator.profile&.contact&.full_street
.row
.col-xs-3= t('assignment_pdf.telephone')
.col-xs-9.col-input= @group_assignment.creator.profile.contact.primary_phone
.col-xs-9.col-input= @group_assignment.creator.profile&.contact&.primary_phone
.row
.col-xs-3= t('assignment_pdf.mobile')
.col-xs-9.col-input= @group_assignment.creator.profile.contact.secondary_phone
.col-xs-9.col-input= @group_assignment.creator.profile&.contact&.secondary_phone
.col-xs-6
.row
.col-xs-3= t('assignment_pdf.first_name')
.col-xs-9.col-input= @group_assignment.creator.profile.contact.first_name
.col-xs-9.col-input= @group_assignment.creator.profile&.contact&.first_name
.row
.col-xs-3 #{t('assignment_pdf.postal_code')} / #{t('assignment_pdf.city')}
.col-xs-9.col-input= @group_assignment.creator.profile.contact.full_city
.col-xs-9.col-input= @group_assignment.creator.profile&.contact&.full_city
.row
.col-xs-3= t('assignment_pdf.email')
.col-xs-9.col-input= @group_assignment.creator.profile.contact.primary_email
.col-xs-9.col-input= @group_assignment.creator.profile&.contact&.primary_email
.row
.col-xs-3= t('assignment_pdf.function')
.col-xs-9.col-input= @group_assignment.creator.profile.profession
.col-xs-9.col-input= @group_assignment.creator.profile&.profession
.row-box
.col-xs-12
......
......@@ -26,7 +26,13 @@ h2= @group_offer.title
= link_to_if policy(@group_offer.department).show?, @group_offer.department, department_path(@group_offer.department.id)
tr
td Verantwortliche/r
td= link_to_if policy(@group_offer.creator.profile).edit?, @group_offer.creator, profile_url_path(@group_offer.creator) if @group_offer.creator
td
- if @group_offer.creator
- if @group_offer.creator.profile.present?
= link_to_if(policy(@group_offer.creator.profile).edit?,
@group_offer.creator, profile_url_path(@group_offer.creator))
- else
= @group_offer.creator.email
tr
td= t_attr(:offer_state)
td= t("offer_state.#{@group_offer.offer_state}") if @group_offer.offer_state?
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment