fix: Prevent crash when refreshing metadata for files without an owner

This crash was mostly happening when using external storages and for example the command "occ memories:migrate-google-takeout"

Signed-off-by: Vincent FarZz <farcry69@live.fr>
pull/48093/head
Vincent FarZz 2024-08-18 19:54:53 +07:00 committed by Benjamin Gaussorgues
parent fcf45b6869
commit b146952b63
1 changed files with 1 additions and 1 deletions

@ -104,7 +104,7 @@ class FilesMetadataManager implements IFilesMetadataManager {
return $this->refreshMetadata($node, self::PROCESS_BACKGROUND);
}
$this->jobList->add(UpdateSingleMetadata::class, [$node->getOwner()->getUID(), $node->getId()]);
$this->jobList->add(UpdateSingleMetadata::class, [$node->getOwner()?->getUID(), $node->getId()]);
}
return $metadata;