Fixes and improvements
* moves diff_states message back to table top for direct presentation in compensation/detail/view.html * removes diff_states rendering in deadline card in compensation/detail/view.html * fixes before_state adding based on GET parameter * refactors UserActionlogEntryEnum into a UserAction TextChoice (Django 3.x) * adds ordering of compensation states depending on surface value * refactors ServerMessageImportance from enum into TextChoice (Django 3.x) * adds/updates translations
This commit is contained in:
@@ -14,11 +14,10 @@ from django.utils.timezone import now
|
||||
|
||||
from compensation.settings import COMPENSATION_IDENTIFIER_LENGTH, COMPENSATION_IDENTIFIER_TEMPLATE
|
||||
from intervention.models import Intervention, ResponsibilityData
|
||||
from konova.enums import UserActionLogEntryEnum
|
||||
from konova.models import BaseObject, BaseResource, Geometry, UuidModel
|
||||
from konova.utils.generators import generate_random_string
|
||||
from organisation.models import Organisation
|
||||
from user.models import UserActionLogEntry
|
||||
from user.models import UserActionLogEntry, UserAction
|
||||
|
||||
|
||||
class Payment(BaseResource):
|
||||
@@ -156,11 +155,9 @@ class Compensation(AbstractCompensation):
|
||||
action = UserActionLogEntry.objects.create(
|
||||
user=_user,
|
||||
timestamp=_now,
|
||||
action=UserActionLogEntryEnum.DELETED.value
|
||||
action=UserAction.DELETED
|
||||
)
|
||||
self.deleted = action
|
||||
#self.deleted_on = _now
|
||||
#self.deleted_by = _user
|
||||
self.save()
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user