From 739f55be14e161e485b2107b628689c4f01ded6b Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Fri, 4 Nov 2022 10:25:40 +0100 Subject: [PATCH] fixes --- src/funding/models.py | 3 ++- src/funding/templates/funding/2022/includes/funding.html | 2 +- src/funding/templates/funding/2022/offer_detail.html | 2 +- src/social/templates/social/carousel_2022.html | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/funding/models.py b/src/funding/models.py index 7d0e74247..089b875b1 100644 --- a/src/funding/models.py +++ b/src/funding/models.py @@ -1,3 +1,4 @@ + # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # @@ -204,7 +205,7 @@ class Offer(models.Model): 'is_current': self.is_current(), 'is_win': offer_sum >= self.target, 'missing': self.target - offer_sum, - 'percentage': 100 * offer_sum / self.target, + 'percentage': min(100, 100 * offer_sum / self.target), 'show_title': True, 'show_title_calling': True, diff --git a/src/funding/templates/funding/2022/includes/funding.html b/src/funding/templates/funding/2022/includes/funding.html index f80a07547..b2dc55890 100644 --- a/src/funding/templates/funding/2022/includes/funding.html +++ b/src/funding/templates/funding/2022/includes/funding.html @@ -11,7 +11,7 @@
{% endif %}
- +