Pay: move some model-related methods from helpers to models

Otherwise we end up in circular dependency hell
This commit is contained in:
fnux 2020-03-04 09:39:18 +01:00
commit 9aabc66e57
6 changed files with 108 additions and 107 deletions

View file

@ -7,7 +7,7 @@ from django.core.exceptions import ObjectDoesNotExist
from datetime import timedelta, date
from django.utils import timezone
from uncloud_pay.helpers import generate_bills_for
from uncloud_pay.models import Bill
BILL_PAYMENT_DELAY=timedelta(days=10)
@ -28,7 +28,7 @@ class Command(BaseCommand):
for user in users:
now = timezone.now()
generate_bills_for(
Bill.generate_for(
year=now.year,
month=now.month,
user=user,