mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-15 17:17:02 +02:00
Update admin.py
This commit is contained in:
parent
3189b50baa
commit
d18baa773c
1 changed files with 2 additions and 1 deletions
|
@ -1169,8 +1169,9 @@ class DomainAdmin(ListHeaderAdmin):
|
||||||
# If the expiration date is super old (2020, for example), we need to
|
# If the expiration date is super old (2020, for example), we need to
|
||||||
# "catch up" to the current year, so we add the difference.
|
# "catch up" to the current year, so we add the difference.
|
||||||
# If both years match, then lets just proceed as normal.
|
# If both years match, then lets just proceed as normal.
|
||||||
|
calculated_exp_date = exp_date + relativedelta(years=1)
|
||||||
years = 1
|
years = 1
|
||||||
if desired_date > exp_date:
|
if desired_date > calculated_exp_date:
|
||||||
year_difference = desired_date.year - exp_date.year
|
year_difference = desired_date.year - exp_date.year
|
||||||
years = year_difference
|
years = year_difference
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue