progress = PayUOrder.objects.filter(
completed_at__gte=self.since,
completed_at__lte=self.until,
- ).aggregate(c=models.Sum('schedule__amount'))['c']
+ ).aggregate(c=models.Sum('schedule__amount'))['c'] or 0
for schedule in Schedule.objects.filter(
method='paypal',
<div class="progress-box">
<div>
<div class="l-checkout__support__bar">
- <span class="{% if banner.progress_percent < 15 %}little-progress{% endif %}" data-label="{{ banner.progress_percent_pretty }}%" style="width: {{ banner.progress_percent|stringformat:".3f" }}%;"></span>
+ <span class="{% if banner.progress_percent < 15 %}little-progress{% endif %}" data-label="{{ banner.progress_percent|floatformat:"2" }}%" style="width: {{ banner.progress_percent|stringformat:".3f" }}%;"></span>
</div>
</div>
</div>
<strong class="countdown inline" data-until='{{ banner.until|date_to_utc:True|utc_for_js }}'> </strong>
</div>
{% if banner.target %}
- <strong>{{ banner.target }} zł</strong>
+ <strong>{{ banner.target|floatformat:"g" }} zł</strong>
{% endif %}
</div>
</div>
consents = []
for consent, key, consent_field in self.consent:
- if self.cleaned_data[key]:
+ if consent.required or self.cleaned_data[key]:
instance.consent.add(consent)
return instance
line-height: 150%;
color: #FFFFFF;
margin-top: 8px;
- max-width: 410px;
}
.l-checkout__box__header__content {