fix of None
This commit is contained in:
parent
a944a199aa
commit
de7f93966a
@ -52,7 +52,7 @@ def register(request):
|
||||
|
||||
try:
|
||||
latest_user = User.objects.latest("invoice_id")
|
||||
if latest_user.invoice_id < invoice_id:
|
||||
if latest_user.invoice_id is None or latest_user.invoice_id < invoice_id:
|
||||
invoice_id = invoice_id + 1
|
||||
else:
|
||||
invoice_id = latest_user.invoice_id + 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user