Unit test intervention forms
* adds unit test for new/edit intervention forms * improves code base for generating new identifiers
This commit is contained in:
@@ -10,6 +10,7 @@ import shutil
|
||||
from django.contrib import messages
|
||||
|
||||
from codelist.models import KonovaCode
|
||||
from compensation.settings import COMPENSATION_IDENTIFIER_TEMPLATE, COMPENSATION_IDENTIFIER_LENGTH
|
||||
from user.models import User, Team
|
||||
from django.db import models, transaction
|
||||
from django.db.models import QuerySet, Sum
|
||||
@@ -296,6 +297,9 @@ class Compensation(AbstractCompensation, CEFMixin, CoherenceMixin, PikMixin):
|
||||
|
||||
objects = CompensationManager()
|
||||
|
||||
identifier_length = COMPENSATION_IDENTIFIER_LENGTH
|
||||
identifier_template = COMPENSATION_IDENTIFIER_TEMPLATE
|
||||
|
||||
def __str__(self):
|
||||
return "{}".format(self.identifier)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user