Compare commits
No commits in common. "b2deb223e928454e3e06ba889900f7a64e3e0073" and "5d2aa43115c82851ffc61783a01278df8ee99ef0" have entirely different histories.
b2deb223e9
...
5d2aa43115
@ -9,4 +9,4 @@ Created on: 19.10.21
|
||||
# Defines the date of the legal publishing of the LKompVzVo
|
||||
from django.utils import timezone
|
||||
|
||||
LKOMPVZVO_PUBLISH_DATE = timezone.make_aware(timezone.datetime.fromisoformat("2018-06-16")).date()
|
||||
LKOMPVZVO_PUBLISH_DATE = timezone.make_aware(timezone.datetime.fromisoformat("2018-06-16"))
|
||||
|
@ -13,7 +13,6 @@ from django.db.models.fields.files import FieldFile
|
||||
from django.urls import reverse
|
||||
from django.utils import timezone
|
||||
|
||||
from analysis.settings import LKOMPVZVO_PUBLISH_DATE
|
||||
from intervention.tasks import celery_export_to_egon
|
||||
from user.models import User
|
||||
from django.db import models, transaction
|
||||
@ -326,14 +325,13 @@ class Intervention(BaseObject,
|
||||
"""
|
||||
now_date = timezone.now().date()
|
||||
binding_date = self.legal.binding_date
|
||||
is_old_entry = binding_date < LKOMPVZVO_PUBLISH_DATE
|
||||
is_binding_date_ready = binding_date is not None and binding_date <= now_date
|
||||
is_recorded = self.recorded is not None
|
||||
is_free_of_revocations = not self.legal.revocations.exists()
|
||||
is_ready = is_binding_date_ready \
|
||||
and is_recorded \
|
||||
and is_free_of_revocations
|
||||
return is_ready or is_old_entry
|
||||
return is_ready
|
||||
|
||||
def get_share_link(self):
|
||||
""" Returns the share url for the object
|
||||
|
Loading…
Reference in New Issue
Block a user