Commit 9c4a92e1 authored by frekk's avatar frekk

Merge branch 'frekk-testing' into 'master'

fix the bugs that were supposed to be already fixed

See merge request frekk/uccportal!9
parents 61008f4a d8bb6890
......@@ -129,7 +129,7 @@ def refresh_dispense_payment(modeladmin, request, queryset):
num_changed = 0
membership_list = list(queryset)
for ms in membership_list:
if ms.date_paid is not None or ms.username == '' or ms.username is None:
if ms.date_paid is not None:
continue
if try_update_from_dispense(ms):
ms.save()
......
......@@ -95,6 +95,10 @@ def try_update_from_dispense(membership):
Note: this WILL overwrite any existing payment information
"""
if membership.member.username == '' or membership.member.username is None:
# can't do anything with empty usernames
return False
# check if anything has happened since last time
if member_cokelog.is_loaded():
member_cokelog.reload()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment