mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
fix(webhook_listeners): Allow null for user_id_filter for oracle
Empty string and null are the same thing on oracle databases so we have to allow it. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
b6aef4d235
commit
7c577c98ef
3 changed files with 4 additions and 3 deletions
|
|
@ -60,8 +60,9 @@ class WebhookListener extends Entity implements \JsonSerializable {
|
|||
protected $eventFilter;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @var ?string
|
||||
* If not empty, id of the user that needs to be connected for the webhook to trigger
|
||||
* @psalm-suppress PropertyNotSetInConstructor
|
||||
*/
|
||||
protected $userIdFilter;
|
||||
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ class WebhookListenerMapper extends QBMapper {
|
|||
return $this->findEntities($qb);
|
||||
}
|
||||
|
||||
private function buildCacheKey(?string $userIdFilter = ''): string {
|
||||
private function buildCacheKey(?string $userIdFilter): string {
|
||||
return self::EVENTS_CACHE_KEY_PREFIX.'_'.($userIdFilter ?? '');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class Version1000Date20240527153425 extends SimpleMigrationStep {
|
|||
'notnull' => false,
|
||||
]);
|
||||
$table->addColumn('user_id_filter', Types::STRING, [
|
||||
'notnull' => true,
|
||||
'notnull' => false,
|
||||
'length' => 64,
|
||||
]);
|
||||
$table->addColumn('headers', Types::TEXT, [
|
||||
|
|
|
|||
Loading…
Reference in a new issue