Fix backward compatibility in EditRouting.py

Signed-off-by: Loren Eteval <loren.eteval@proton.me>
This commit is contained in:
Loren Eteval
2023-09-21 17:56:38 +08:00
parent 2cfe108e4a
commit 64b7157993
+4
View File
@@ -1024,6 +1024,10 @@ class EditRoutingTableWidget(Translatable, SupportConnectedCallback, TableWidget
text, hint=_(HYSTERIA_ROUTING_HINT), isBuiltin=False
)
# Added for backward compatibility
if self.RoutesList[routesIndex].get(Hysteria1.name()) is None:
self.RoutesList[routesIndex][Hysteria1.name()] = {'acl': '', 'mmdb': ''}
routingDialog.ruleEdit.setText(
self.RoutesList[routesIndex][Hysteria1.name()].get('acl', '')
)