diff --git a/public/themes/custom/asuntotuotanto/asuntotuotanto.theme b/public/themes/custom/asuntotuotanto/asuntotuotanto.theme index fa95f198..3b40098b 100644 --- a/public/themes/custom/asuntotuotanto/asuntotuotanto.theme +++ b/public/themes/custom/asuntotuotanto/asuntotuotanto.theme @@ -289,7 +289,10 @@ function asuntotuotanto_preprocess_views_view_table(&$variables) { $variables['rows'][$key]['is_application_period_active'] = $is_application_period_active; $variables['rows'][$key]['apartment_number'] = $apartment->field_apartment_number->value; $variables['rows'][$key]['reserved_or_sold'] = $reserved_or_sold; - $variables['rows'][$key]['application_url'] = $project->getApplicationUrl($apartment->id()); + $variables['rows'][$key]['application_url'] = $project->getApplicationUrl( + $apartment->id(), + $apartment->field_apartment_state_of_sale->target_id ?? NULL + ); $variables['rows'][$key]['application_url_title'] = $apartment->getApplicationUrlTitle(); $variables['rows'][$key]['is_free'] = $apartment->isFree(); $variables['rows'][$key]['can_apply_afterwards'] = $project->getCanApplyAfterwards();