Unit test intervention forms
* adds unit test for new/edit intervention forms * improves code base for generating new identifiers
This commit is contained in:
@@ -14,7 +14,7 @@ from django.urls import reverse
|
||||
from django.utils import timezone
|
||||
|
||||
from analysis.settings import LKOMPVZVO_PUBLISH_DATE
|
||||
from compensation.models import EcoAccountDeduction
|
||||
from intervention.settings import INTERVENTION_IDENTIFIER_LENGTH, INTERVENTION_IDENTIFIER_TEMPLATE
|
||||
from intervention.tasks import celery_export_to_egon
|
||||
from user.models import User
|
||||
from django.db import models, transaction
|
||||
@@ -61,6 +61,9 @@ class Intervention(BaseObject,
|
||||
|
||||
objects = InterventionManager()
|
||||
|
||||
identifier_length = INTERVENTION_IDENTIFIER_LENGTH
|
||||
identifier_template = INTERVENTION_IDENTIFIER_TEMPLATE
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.identifier} ({self.title})"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user