mirror of
https://github.com/erpnext/foundation.git
synced 2026-10-16 18:00:47 +02:00
"[fix] NoneType not iterable at get_paid_backers in bounty.py"
This commit is contained in:
@@ -80,4 +80,7 @@ def get_list_context(context):
|
||||
context.get_paid_backers = get_paid_backers
|
||||
|
||||
def get_paid_backers(backers):
|
||||
return [backer for backer in backers if backer.paid]
|
||||
if backers:
|
||||
return [backer for backer in backers if backer.paid]
|
||||
else:
|
||||
return 0
|
||||
@@ -16,7 +16,8 @@
|
||||
<span class="label">{{ comments }} <i
|
||||
class='octicon octicon-comment-discussion'></i></span>
|
||||
{% endif %}
|
||||
{% if no_of_backers|len > 0 %}
|
||||
{% set paid_backers = get_paid_backers(doc.bounty_backer) %}
|
||||
{% if paid_backers and paid_backers|len > 0 %}
|
||||
<span class="label">
|
||||
{{ paid_backers|len }}
|
||||
{% if paid_backers|len > 1 %}
|
||||
|
||||
Reference in New Issue
Block a user