From 3e10dca932bd8f44e15ded569aa4198fd56eb33a Mon Sep 17 00:00:00 2001 From: Corentin Cadiou Date: Sun, 24 Nov 2019 14:06:04 +0000 Subject: [PATCH] Automatically add local currency to destination --- bumblebee/modules/currency.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/bumblebee/modules/currency.py b/bumblebee/modules/currency.py index 4e2e7c2..24b507a 100644 --- a/bumblebee/modules/currency.py +++ b/bumblebee/modules/currency.py @@ -73,10 +73,14 @@ class Module(bumblebee.engine.Module): else: self._base = src - dest = [d for d in self.parameter("destination", DEFAULT_DEST).split(",") - if d != self._base] - self._symbols = dest - + self._symbols = [] + for d in self.parameter("destination", DEFAULT_DEST).split(","): + if d == 'auto': + new = self.find_local_currency() + else: + new = d + if new != self._base: + self._symbols.append(new) def price(self, widget): if len(self._data) == 0: