From 85e8f4905b23d7e4719c7093b0b4bda453a4cac2 Mon Sep 17 00:00:00 2001 From: Matthias Merz Date: Wed, 3 Jun 2020 22:26:32 +0200 Subject: [PATCH] Finance/Quote/Morningstarde.pm: generalize: lookup in id-mapping, and regard symbol as morningstar-ID otherwise --- Finance/Quote/Morningstarde.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Finance/Quote/Morningstarde.pm b/Finance/Quote/Morningstarde.pm index ff44a54..e62cb98 100644 --- a/Finance/Quote/Morningstarde.pm +++ b/Finance/Quote/Morningstarde.pm @@ -42,11 +42,14 @@ sub labels { return (morningstarde => \@labels); } sub get_stock_url { - my $stock_wkn = shift; + my $stock_symbol = shift; - my $id = $idmap{lc($stock_wkn)}; + # check ID-map for symbol, otherwise interpret as an ID + my $id = $idmap{lc($stock_symbol)}; if (defined($id)) { return baseurl() . $id; + } else { + return baseurl() . $stock_symbol; }; }