From 562767a60d467171ae246ebd35817f8d25db028e Mon Sep 17 00:00:00 2001 From: DEsimas Date: Fri, 20 Dec 2024 01:05:55 +0300 Subject: [PATCH] fix: UI rouble sign --- UI/src/models/game.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UI/src/models/game.py b/UI/src/models/game.py index 7df079d..458ce71 100644 --- a/UI/src/models/game.py +++ b/UI/src/models/game.py @@ -15,4 +15,4 @@ class Game: def __str__(self): cleaned_string = self.price.replace("\u202f", "")[:-2] cleaned_string = cleaned_string.replace(",", ".") - return f"{self.name}\nЖанр: {self.genre}\nИздатель: {self.publisher}\n" + (str(self.price) if self.discount is None else f"{math.ceil(float(cleaned_string) * self.discount / 100)} -{self.discount}%") + (f"\n{self.count} шт." if self.count is not None else "") + return f"{self.name}\nЖанр: {self.genre}\nИздатель: {self.publisher}\n" + (str(self.price) if self.discount is None else f"{math.ceil(float(cleaned_string) * self.discount / 100)} ₽ -{self.discount}%") + (f"\n{self.count} шт." if self.count is not None else "")