From 0ef913acae9447615ed771a67046c10dd0e87829 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Taymans?= Date: Tue, 11 Jun 2019 19:04:44 +0200 Subject: [PATCH] [FIX] emc: Error casting str to int I get this error when taking shares from the website form by a logged user. --- easy_my_coop/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easy_my_coop/controllers/main.py b/easy_my_coop/controllers/main.py index b9425da..b139959 100644 --- a/easy_my_coop/controllers/main.py +++ b/easy_my_coop/controllers/main.py @@ -277,7 +277,7 @@ class WebsiteSubscription(http.Controller): max_amount = max_amount - partner.total_value if company.unmix_share_type: share = self.get_selected_share(kwargs) - if int(partner.cooperator_type) != share.id: + if partner.cooperator_type != share.short_name: values = self.fill_values(values, is_company, logged) values["error_msg"] = (_("You can't subscribe two " "different types of share"))