django-orchestra/orchestra/apps/payments/actions.py

5 lines
193 B
Python

def process_transactions(modeladmin, request, queryset):
for source, transactions in queryset.group_by('source'):
if source:
source.method_class().process(transactions)