|
|
@ -11,7 +11,7 @@ from serde import ValidationError
|
|
|
|
|
|
|
|
|
|
|
|
from core.forms import AccountForm
|
|
|
|
from core.forms import AccountForm
|
|
|
|
from core.lib.serde import drakdoo
|
|
|
|
from core.lib.serde import drakdoo
|
|
|
|
from core.models import Callback, Account
|
|
|
|
from core.models import Account, Callback
|
|
|
|
from core.util import logs
|
|
|
|
from core.util import logs
|
|
|
|
|
|
|
|
|
|
|
|
log = logs.get_logger(__name__)
|
|
|
|
log = logs.get_logger(__name__)
|
|
|
@ -97,7 +97,9 @@ class AccountAction(LoginRequiredMixin, APIView):
|
|
|
|
|
|
|
|
|
|
|
|
if account_id:
|
|
|
|
if account_id:
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
form = AccountForm(request.data, instance=account.objects.get(id=account_id))
|
|
|
|
form = AccountForm(
|
|
|
|
|
|
|
|
request.data, instance=account.objects.get(id=account_id)
|
|
|
|
|
|
|
|
)
|
|
|
|
except account.DoesNotExist:
|
|
|
|
except account.DoesNotExist:
|
|
|
|
message = "Account does not exist"
|
|
|
|
message = "Account does not exist"
|
|
|
|
message_class = "danger"
|
|
|
|
message_class = "danger"
|
|
|
|