luci-base: handle potential crash in luci.model.network.interface.get_i18n()

Should prevent the crash mentioned in #1779.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2018-05-19 22:11:05 +02:00
parent 9ed48ef2a6
commit 64da34b13c

View file

@ -1273,7 +1273,7 @@ function interface.get_i18n(self)
return "%s: %s %q" %{
lng.translate("Wireless Network"),
self.wif:active_mode(),
self.wif:active_ssid() or self.wif:active_bssid() or self.wif:id()
self.wif:active_ssid() or self.wif:active_bssid() or self.wif:id() or "?"
}
else
return "%s: %q" %{ self:get_type_i18n(), self:name() }