Automatically add local currency to destination

This commit is contained in:
Corentin Cadiou 2019-11-24 14:06:04 +00:00
parent b6a0cb9e6f
commit 3e10dca932

View file

@ -73,10 +73,14 @@ class Module(bumblebee.engine.Module):
else: else:
self._base = src self._base = src
dest = [d for d in self.parameter("destination", DEFAULT_DEST).split(",") self._symbols = []
if d != self._base] for d in self.parameter("destination", DEFAULT_DEST).split(","):
self._symbols = dest if d == 'auto':
new = self.find_local_currency()
else:
new = d
if new != self._base:
self._symbols.append(new)
def price(self, widget): def price(self, widget):
if len(self._data) == 0: if len(self._data) == 0: