Refactoring
* moves adding of deduction into Intervention and EcoAccount model * hardens against circular import issues
This commit is contained in:
@@ -15,7 +15,6 @@ from django.utils.translation import gettext_lazy as _
|
||||
from compensation.managers import CompensationManager
|
||||
from compensation.models import CompensationState, CompensationAction
|
||||
from compensation.utils.quality import CompensationQualityChecker
|
||||
from intervention.models import Responsibility, Intervention
|
||||
from konova.models import BaseObject, AbstractDocument, Geometry, Deadline, generate_document_file_upload_path
|
||||
from konova.settings import DEFAULT_SRID_RLP, LANIS_LINK_TEMPLATE
|
||||
from user.models import UserActionLogEntry, UserAction
|
||||
@@ -28,7 +27,7 @@ class AbstractCompensation(BaseObject):
|
||||
|
||||
"""
|
||||
responsible = models.OneToOneField(
|
||||
Responsibility,
|
||||
"intervention.Responsibility",
|
||||
on_delete=models.SET_NULL,
|
||||
null=True,
|
||||
blank=True,
|
||||
@@ -186,7 +185,7 @@ class Compensation(AbstractCompensation, CEFMixin, CoherenceMixin):
|
||||
Regular compensation, linked to an intervention
|
||||
"""
|
||||
intervention = models.ForeignKey(
|
||||
Intervention,
|
||||
"intervention.Intervention",
|
||||
on_delete=models.CASCADE,
|
||||
null=True,
|
||||
blank=True,
|
||||
|
||||
Reference in New Issue
Block a user