Unit test intervention forms
* adds unit test for new/edit intervention forms * improves code base for generating new identifiers
This commit is contained in:
@@ -15,6 +15,7 @@ from django.urls import reverse
|
||||
|
||||
from compensation.models import AbstractCompensation, PikMixin
|
||||
from ema.managers import EmaManager
|
||||
from ema.settings import EMA_IDENTIFIER_LENGTH, EMA_IDENTIFIER_TEMPLATE
|
||||
from ema.utils.quality import EmaQualityChecker
|
||||
from konova.models import AbstractDocument, generate_document_file_upload_path, RecordableObjectMixin, ShareableObjectMixin
|
||||
from konova.utils.message_templates import DATA_UNSHARED_EXPLANATION, DOCUMENT_REMOVED_TEMPLATE
|
||||
@@ -38,6 +39,9 @@ class Ema(AbstractCompensation, ShareableObjectMixin, RecordableObjectMixin, Pik
|
||||
"""
|
||||
objects = EmaManager()
|
||||
|
||||
identifier_length = EMA_IDENTIFIER_LENGTH
|
||||
identifier_template = EMA_IDENTIFIER_TEMPLATE
|
||||
|
||||
def __str__(self):
|
||||
return "{}".format(self.identifier)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user