-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added new allocation status "Active (Needs Renewal)"
When any Coldfront expires, the allocation's status will change to "Active (Needs Renewal)" instead of "Expired"
- Loading branch information
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
diff --git a/coldfront/core/allocation/management/commands/add_allocation_defaults.py b/coldfront/core/allocation/management/commands/add_allocation_defaults.py | ||
index ca5c4fc..556eeb2 100644 | ||
--- a/coldfront/core/allocation/management/commands/add_allocation_defaults.py | ||
+++ b/coldfront/core/allocation/management/commands/add_allocation_defaults.py | ||
@@ -16,7 +16,7 @@ class Command(BaseCommand): | ||
'Attribute Expanded Text'): | ||
AttributeType.objects.get_or_create(name=attribute_type) | ||
|
||
- for choice in ('Active', 'Denied', 'Expired', | ||
+ for choice in ('Active (Needs Renewal)', 'Active', 'Denied', 'Expired', | ||
'New', 'Paid', 'Payment Pending', | ||
'Payment Requested', 'Payment Declined', | ||
'Renewal Requested', 'Revoked', 'Unpaid',): | ||
diff --git a/coldfront/core/allocation/tasks.py b/coldfront/core/allocation/tasks.py | ||
index e1a37fc..ba96800 100644 | ||
--- a/coldfront/core/allocation/tasks.py | ||
+++ b/coldfront/core/allocation/tasks.py | ||
@@ -29,7 +29,7 @@ EMAIL_ADMIN_LIST = import_from_settings('EMAIL_ADMIN_LIST') | ||
def update_statuses(): | ||
|
||
expired_status_choice = AllocationStatusChoice.objects.get( | ||
- name='Expired') | ||
+ name='Active (Needs Renewal)') | ||
allocations_to_expire = Allocation.objects.filter( | ||
status__name__in=['Active','Payment Pending','Payment Requested', 'Unpaid',], end_date__lt=datetime.datetime.now().date()) | ||
for sub_obj in allocations_to_expire: |