From 0d19cd8662b6a4f7fdf9a2fabe8876e1df6bb7fc Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Sun, 6 Feb 2022 21:40:26 +0000 Subject: [PATCH] Remove references to old portal --- apiserver/apiserver/api/utils.py | 32 -------------------------------- apiserver/apiserver/settings.py | 4 ---- 2 files changed, 36 deletions(-) diff --git a/apiserver/apiserver/api/utils.py b/apiserver/apiserver/api/utils.py index 892224a..de06a99 100644 --- a/apiserver/apiserver/api/utils.py +++ b/apiserver/apiserver/api/utils.py @@ -82,38 +82,6 @@ def calc_member_status(expire_date, fake_date=None): def add_months(date, num_months): return date + relativedelta.relativedelta(months=num_months) -def fake_missing_membership_months(member): - ''' - Add fake months on importing the member so the length of their membership - resolves to their imported expiry date - ''' - start_date = member.current_start_date - expire_date = member.expire_date - - missing_months = num_months_spanned(expire_date, start_date) - - user = member.user - tx = False - for i in range(missing_months): - memo = '{} / {} month membership dues accounting old portal import, {} to {} - hidden'.format( - str(i+1), str(missing_months), start_date, expire_date - ) - - tx = models.Transaction.objects.create( - amount=0, - user=user, - memo=memo, - reference_number='', - info_source='System', - payment_method='N/A', - category='Memberships:Fake Months', - account_type='Clearing', - number_of_membership_months=1, - date=add_months(start_date, i), - ) - - return tx, missing_months - def tally_membership_months(member, fake_date=None): ''' Sum together member's dues and calculate their new expire date and status diff --git a/apiserver/apiserver/settings.py b/apiserver/apiserver/settings.py index 48ac9d2..20e873b 100644 --- a/apiserver/apiserver/settings.py +++ b/apiserver/apiserver/settings.py @@ -119,10 +119,6 @@ DATABASES = { 'timeout': 20, # increased because generate_backups.py blocks }, }, - 'old_portal': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': os.path.join(BASE_DIR, 'old_portal.sqlite3'), - } } CACHES = {