summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Radovanovic <74266147+IgorWounds@users.noreply.github.com>2023-05-22 20:58:37 +0200
committerGitHub <noreply@github.com>2023-05-22 18:58:37 +0000
commitd7487665733ad810b88e048550489f72a51a1220 (patch)
tree2507809b850226515c06f9c40833ba4907b6a3c7
parent5b4b8f9ee3b01163a07304955729fd574b569b58 (diff)
Preserve stock ticker suffix (#5056)
* Preserve suffix * Fix suffix doubling
-rw-r--r--openbb_terminal/parent_classes.py2
-rw-r--r--openbb_terminal/stocks/stocks_controller.py12
2 files changed, 4 insertions, 10 deletions
diff --git a/openbb_terminal/parent_classes.py b/openbb_terminal/parent_classes.py
index f58a5a1a523..a0691a149fe 100644
--- a/openbb_terminal/parent_classes.py
+++ b/openbb_terminal/parent_classes.py
@@ -1209,6 +1209,8 @@ class StockBaseController(BaseController, metaclass=ABCMeta):
stocks_helper.show_quick_performance(self.stock, ns_parser.ticker)
if "." in ns_parser.ticker:
self.ticker, self.suffix = ns_parser.ticker.upper().split(".")
+ if "." not in self.ticker:
+ self.ticker = ns_parser.ticker.upper()
else:
self.ticker = ns_parser.ticker.upper()
self.suffix = ""
diff --git a/openbb_terminal/stocks/stocks_controller.py b/openbb_terminal/stocks/stocks_controller.py
index 4b18963a2c6..adc11fdf306 100644
--- a/openbb_terminal/stocks/stocks_controller.py
+++ b/openbb_terminal/stocks/stocks_controller.py
@@ -141,12 +141,7 @@ class StocksController(StockBaseController):
def custom_reset(self):
"""Class specific component of reset command."""
if self.ticker:
- return [
- "stocks",
- f"load {self.ticker}.{self.suffix}"
- if self.suffix
- else f"load {self.ticker}",
- ]
+ return ["stocks", f"load {self.ticker}"]
return []
def custom_load_wrapper(self, other_args: List[str]):
@@ -735,9 +730,7 @@ class StocksController(StockBaseController):
self.queue = self.load_class(
ca_controller.ComparisonAnalysisController,
- [f"{self.ticker}.{self.suffix}" if self.suffix else self.ticker]
- if self.ticker
- else "",
+ [f"{self.ticker}"] if self.ticker else "",
self.queue,
)
@@ -752,7 +745,6 @@ class StocksController(StockBaseController):
self.start,
self.interval,
self.stock,
- self.suffix,
self.queue,
)