-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Description
Description
Toggling the Avatar switches in admin/config URL does not change the configuration as requested: reloading the page moves the switches back to their original position.
I verified the request is sent to the server, the request is also logged by the server:
2023/01/04 00:04:41 [63b4b489] router: completed POST /admin/config for 192.168.1.82:44014, 200 OK in 2.6ms @ admin/config.go:193(admin.ChangeConfig)
BUT there's no change in the database (PostgreSQL) and reloading the page shows it (switches are back to their original position)
Gitea Version
1.19.0+dev-264-g32e863439 P
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
from build tree. Cannot reproduce on try.gitea.io only because I'm not admin there, but if you grant me admin (strk) I can try
Database
PostgreSQL
Metadata
Metadata
Assignees
Labels
Type
Projects
Relationships
Development
Select code repository
Activity
strk commentedon Jan 3, 2023
Bug seems to be in
func SetSetting
inmodels/system/setting.go
whereas theupsertSettingValue
function is ONLY invoked when the key is not already cached in the settings cache. Sounds wrong to only conditionally upsert...strk commentedon Jan 3, 2023
@lunny git blame tells it was you the last to touch that
SetSetting
functionlunny commentedon Jan 3, 2023
I Will take a look at it today. Thank you for your report.
strk commentedon Jan 3, 2023
The bug is possibly rooted in PR #22295 there's evidently an hole in testsuite regarding caches
Fix set system setting failure once it cached (#22333)
Fix set system setting failure once it cached (go-gitea#22333)