From: Radek Czajka Date: Fri, 4 Nov 2022 09:25:40 +0000 (+0100) Subject: fixes X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/739f55be14e161e485b2107b628689c4f01ded6b?ds=inline fixes --- 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 %}
- +