mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
FIX forward IDs given by DataList::relation()
This way calling `->relation('BlogPosts')` does not return an UnsavedRelationList fixes #619
This commit is contained in:
parent
92eb4f5da0
commit
31a3c3e7d1
@ -20,11 +20,12 @@ use SilverStripe\View\Parsers\URLSegmentFilter;
|
||||
trait BlogObject
|
||||
{
|
||||
/**
|
||||
* @param int|array|null $id Optional ID(s) for parent of this relation, if not the current record
|
||||
* @return DataList
|
||||
*/
|
||||
public function BlogPosts()
|
||||
public function BlogPosts($id = null)
|
||||
{
|
||||
$blogPosts = parent::BlogPosts();
|
||||
$blogPosts = parent::BlogPosts($id);
|
||||
|
||||
$this->extend('updateGetBlogPosts', $blogPosts);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user