SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit a1768a22 authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Polish up

parent f51e8185
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,7 @@ from django.urls import reverse
from django.utils import timezone
from django.utils.html import format_html
from .constants import SUBSIDY_TYPES, SUBSIDY_STATUS
from .constants import SUBSIDY_TYPES, SUBSIDY_TYPE_SPONSORSHIPAGREEMENT, SUBSIDY_STATUS
from .utils import id_to_slug
from scipost.storage import SecureFileStorage
......@@ -58,9 +58,9 @@ class Subsidy(models.Model):
@property
def renewal_action_date(self):
if self.date_until:
if self.date_until and self.subsidy_type == SUBSIDY_TYPE_SPONSORSHIPAGREEMENT:
return self.date_until - datetime.timedelta(days=122)
return None
return '-'
class SubsidyAttachment(models.Model):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment