Просмотр исходного кода

Maintenance: configure_translate model option should only apply if defined.

Co-authored-by: Dusan Vuckovic <dv@zammad.com>
Rolf Schmidt 1 месяц назад
Родитель
Сommit
15b76b62e5

+ 2 - 1
app/assets/javascripts/app/controllers/_ui_element/_application/_ui_element.coffee

@@ -158,7 +158,8 @@ class App.UiElement.ApplicationUiElement
       list = App[ attribute.relation ].search(sortBy: attribute.sortBy)
 
     # Turn on attribute translation if configured for the relation object.
-    attribute.translate = App[ attribute.relation ].configure_translate
+    if 'configure_translate' in App[attribute.relation]
+      attribute.translate = App[attribute.relation].configure_translate
 
     App.Log.debug 'ControllerForm', '_getRelationOptionList', attribute, list