mirror of
https://github.com/nextcloud/server.git
synced 2026-02-18 18:28:50 -05:00
fix(userconfig): Don't fail the precondition if the value is not set at all
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
4d85f44c9f
commit
394febb5d9
1 changed files with 1 additions and 1 deletions
|
|
@ -246,7 +246,7 @@ class AllConfig implements IConfig {
|
|||
$userPreferences = \OCP\Server::get(IUserConfig::class);
|
||||
if ($preCondition !== null) {
|
||||
try {
|
||||
if ($userPreferences->getValueMixed($userId, $appName, $key) !== (string)$preCondition) {
|
||||
if ($userPreferences->hasKey($userId, $appName, $key) && $userPreferences->getValueMixed($userId, $appName, $key) !== (string)$preCondition) {
|
||||
throw new PreConditionNotMetException();
|
||||
}
|
||||
} catch (TypeConflictException) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue