Don't throw on UniqueConstraintViolationException since a written value is okay enough

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2019-02-22 09:49:01 +01:00 committed by Julius Härtl
parent 995cad0cee
commit 901f1d43e9
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
1 changed files with 8 additions and 2 deletions

View File

@ -406,7 +406,10 @@ class Manager implements IManager {
'resource_id' => $query->createNamedParameter($resource->getId()),
'access' => $query->createNamedParameter($access),
]);
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),
]);
try {
$query->execute();
} catch (UniqueConstraintViolationException $e) {
}
}
public function invalidateAccessCacheForUser(?IUser $user): void {