fetch new FSuggest after update

This commit is contained in:
Philipp Holzer 2021-10-23 15:47:07 +02:00 committed by Hypolite Petovan
parent 92c7b99a4f
commit 0d517b590d
1 changed files with 2 additions and 2 deletions

View File

@ -130,7 +130,7 @@ class FriendSuggest extends BaseRepository
if ($fsuggest->id) {
$this->db->update(self::$table_name, $fields, ['id' => $fsuggest->id]);
return $this->factory->createFromTableRow($fields);
return $this->selectOneById($fsuggest->id);
} else {
$this->db->insert(self::$table_name, $fields);
return $this->selectOneById($this->db->lastInsertId());
@ -141,7 +141,7 @@ class FriendSuggest extends BaseRepository
}
/**
* @param Collection\FriendSuggest $fsuggests
* @param Collection\FriendSuggests $fsuggests
*
* @return bool
*