def _resolveLoadCtx(self, ctx=None): nation = ctx['nation'] if ctx is not None and 'nation' in ctx else None if nation is not None and nation in nations.INDICES: nationIdx = nations.INDICES[nation] SelectedNation.select(nationIdx) else: SelectedNation.byDefault()
def _resolveLoadCtx(self, ctx=None): nation = ctx["nation"] if ctx is not None and "nation" in ctx else None if nation is not None and nation in nations.INDICES: nationIdx = nations.INDICES[nation] SelectedNation.select(nationIdx) else: SelectedNation.byDefault()
def _resolveLoadCtx(self, ctx=None): nation = ctx[BackButtonContextKeys.NATION] if ctx is not None and BackButtonContextKeys.NATION in ctx else None if nation is not None and nation in nations.INDICES: nationIdx = nations.INDICES[nation] SelectedNation.select(nationIdx) else: SelectedNation.byDefault() return