fix: role missing on edit

This commit is contained in:
Methapon Metanipat 2024-09-06 17:41:04 +07:00
parent 97458d315c
commit 16825e27f2

View file

@ -531,7 +531,7 @@ export class UserController extends Controller {
let userRole: string | undefined;
if (body.userRole) {
if (body.userRole && user.userRole !== body.userRole) {
let list = await listRole();
if (!Array.isArray(list)) throw new Error("Failed. Cannot get role(s) data from the server.");