From 67421d95c0c0d6062430ddf6b316ed8e5cbc271f Mon Sep 17 00:00:00 2001 From: Quan Date: Wed, 7 Aug 2019 17:57:59 +0700 Subject: [PATCH] Fix function get_updated_currency --- .../services/update_service_VN_VCB.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/currency_rate_update_VN_VCB/services/update_service_VN_VCB.py b/currency_rate_update_VN_VCB/services/update_service_VN_VCB.py index 9e2eebed..4d188056 100644 --- a/currency_rate_update_VN_VCB/services/update_service_VN_VCB.py +++ b/currency_rate_update_VN_VCB/services/update_service_VN_VCB.py @@ -64,10 +64,10 @@ def get_updated_currency(self, currency_array, main_currency, else: curr_data = self.rate_retrieve(dom, vcb_ns, curr) if main_currency == 'VND': - rate = curr_data['rate_currency'] + rate = 1 / curr_data['rate_currency'] else: - rate = (curr_data['rate_currency'] / - main_curr_data['rate_currency']) + rate = (main_curr_data['rate_currency'] / + curr_data['rate_currency']) self.updated_currency[curr] = rate _logger.debug( "Rate retrieved : 1 %s = %s %s" % (main_currency, rate, curr))