summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib')
-rw-r--r--apps/dav/lib/AppInfo/Application.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/dav/lib/AppInfo/Application.php b/apps/dav/lib/AppInfo/Application.php
index c22afa755cb..d5e3358d96d 100644
--- a/apps/dav/lib/AppInfo/Application.php
+++ b/apps/dav/lib/AppInfo/Application.php
@@ -255,7 +255,10 @@ class Application extends App {
$principalUri = $event->getArgument('calendarData')['principaluri'];
if (strpos($principalUri, 'principals/users') === 0) {
list(, $UID) = \Sabre\Uri\split($principalUri);
- $config->deleteUserValue($UID, 'dav', 'defaultCalendar');
+ $uri = $event->getArgument('calendarData')['uri'];
+ if ($config->getUserValue($UID, 'dav', 'defaultCalendar') === $uri) {
+ $config->deleteUserValue($UID, 'dav', 'defaultCalendar');
+ }
}
});
}