better success message and removed devicelog var

This commit is contained in:
Thomas Nahuel Rusiecki 2024-12-30 15:25:57 -03:00 committed by Cayo Puigdefabregas
parent 2d0474fcbb
commit f85c5668be
2 changed files with 2 additions and 3 deletions

View file

@ -7,7 +7,6 @@ from django.urls import reverse_lazy
from django.utils.translation import gettext_lazy as _
from action.models import State, StateDefinition, Note, DeviceLog
from device.models import Device
import logging
class ChangeStateView(View):
@ -34,7 +33,8 @@ class ChangeStateView(View):
user=self.request.user,
institution=self.request.user.institution,
)
messages.success(request,message)
messages.success(request, _("State succesfuly changed from '{}' to '{}' ".format(previous_state, new_state) ) )
else:
messages.error(request, "There was an error with your submission.")

View file

@ -65,7 +65,6 @@ ENABLE_EMAIL = config("ENABLE_EMAIL", default=True, cast=bool)
EVIDENCES_DIR = config("EVIDENCES_DIR", default=os.path.join(BASE_DIR, "db"))
DEVICE_LOG_PATH = config("DEVICE_LOG_PATH", default="/tmp")
# Application definition