Skip to content

Commit f337d25

Browse files
committed
fix(User Management): Even after a system variable value is deleted, the user bindings still exist when viewing user management.
1 parent 606949a commit f337d25

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

frontend/src/views/system/user/User.vue

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,16 @@ const editHandler = (row: any) => {
911911
})
912912
.finally(() => {
913913
state.form.system_variables = state.form.system_variables.filter((ele: any) => {
914-
return !!variableValueMap.value[ele.variableId]
914+
if (variableValueMap.value[ele.variableId]) {
915+
if (variableValueMap.value[ele.variableId].var_type === 'text') {
916+
ele.variableValues = variableValueMap.value[ele.variableId].value.filter(
917+
(item: any) => ele.variableValues.indexOf(item) > -1
918+
)
919+
return !!ele.variableValues.length
920+
}
921+
return true
922+
}
923+
return false
915924
})
916925
dialogTitle.value = row?.id ? t('user.edit_user') : t('user.add_users')
917926
dialogFormVisible.value = true

0 commit comments

Comments
 (0)