mirror of
https://github.com/openvk/openvk
synced 2024-12-23 00:51:03 +03:00
Albums: fix getAlbumByPhotoId performance issue
This commit is contained in:
parent
4cf50790b1
commit
e6759f089f
1 changed files with 1 additions and 1 deletions
|
@ -119,7 +119,7 @@ class Albums
|
|||
|
||||
function getAlbumByPhotoId(Photo $photo): ?Album
|
||||
{
|
||||
$dbalbum = DatabaseConnection::i()->getContext()->table("album_relations")->where(["media" => $photo->getId()])->fetch();
|
||||
$dbalbum = $this->context->table("album_relations")->where(["media" => $photo->getId()])->fetch();
|
||||
|
||||
return $dbalbum->collection ? $this->get($dbalbum->collection) : null;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue