From 4b9e68207cae7973074dd99f8b7f42c06ea54955 Mon Sep 17 00:00:00 2001 From: nyyu Date: Mon, 15 Mar 2021 23:22:44 +0100 Subject: [PATCH] KB: activate all positions if missing role --- src/kb_data_source.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/kb_data_source.rs b/src/kb_data_source.rs index d243f9f..98ec863 100644 --- a/src/kb_data_source.rs +++ b/src/kb_data_source.rs @@ -174,6 +174,16 @@ impl KBDataSource { positions.push("SUPPORT".to_owned()); } } + + // TODO: find better solution, activate all positions for retrieve older builds + if positions.is_empty() { + positions.push("TOP".to_owned()); + positions.push("JUNGLE".to_owned()); + positions.push("MID".to_owned()); + positions.push("BOT".to_owned()); + positions.push("SUPPORT".to_owned()); + } + positions } @@ -351,6 +361,7 @@ impl DataSource for KBDataSource { break; } } + if let Some(b) = build { champ_data.push(self.get_build(&b));