diff options
author | Joas Schilling <coding@schilljs.com> | 2019-02-22 09:49:01 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-03-01 20:56:59 +0100 |
commit | 901f1d43e98f64de00ab53e65d32fe0426635a91 (patch) | |
tree | dec989acd455fbdfaf1db012a5b5956faa8eaaca /lib/private/Collaboration | |
parent | 995cad0ceebc2efd1b10c0e9e16462ccca773aa8 (diff) | |
download | nextcloud-server-901f1d43e98f64de00ab53e65d32fe0426635a91.tar.gz nextcloud-server-901f1d43e98f64de00ab53e65d32fe0426635a91.zip |
Don't throw on UniqueConstraintViolationException since a written value is okay enough
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Collaboration')
-rw-r--r-- | lib/private/Collaboration/Resources/Manager.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/private/Collaboration/Resources/Manager.php b/lib/private/Collaboration/Resources/Manager.php index 0555be5d7af..0d85db324b6 100644 --- a/lib/private/Collaboration/Resources/Manager.php +++ b/lib/private/Collaboration/Resources/Manager.php @@ -406,7 +406,10 @@ class Manager implements IManager { 'resource_id' => $query->createNamedParameter($resource->getId()), 'access' => $query->createNamedParameter($access), ]); - $query->execute(); + try { + $query->execute(); + } catch (UniqueConstraintViolationException $e) { + } } public function cacheAccessForCollection(ICollection $collection, ?IUser $user, bool $access): void { @@ -419,7 +422,10 @@ class Manager implements IManager { 'collection_id' => $query->createNamedParameter($collection->getId()), 'access' => $query->createNamedParameter($access), ]); - $query->execute(); + try { + $query->execute(); + } catch (UniqueConstraintViolationException $e) { + } } public function invalidateAccessCacheForUser(?IUser $user): void { |