mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-12 23:02:35 +00:00
fix: show the right error when a model cannot be loaded for editing (#29694)
Opening the workspace model editor with an id that cannot be loaded redirected back to the model list and then fell through into the write-access check on the same empty model, so a plain not-found id produced "You do not have permission to edit this model". The message pointed people at their permissions for something that was never a permission problem. The editor now stops after the redirect, so that message only appears when the model loaded and the user really cannot edit it. Refs #29629
This commit is contained in:
parent
ee46e2664a
commit
8383bc708c
1 changed files with 1 additions and 0 deletions
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
if (!model) {
|
||||
goto('/workspace/models');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!model?.write_access) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue