Merge pull request #280 from camfindlay/migrate

FIX Blog tag migration is per Blog
This commit is contained in:
Daniel Hensby 2015-06-29 09:35:50 +01:00
commit 0cab214bf1

View File

@ -38,7 +38,7 @@ class BlogEntry extends BlogPost implements MigratableObject {
//Migrate comma separated tags into BlogTag objects.
foreach($this->TagNames() as $tag) {
$existingTag = BlogTag::get()->filter('Title', $tag);
$existingTag = BlogTag::get()->filter(array('Title' => $tag, 'BlogID' => $this->ParentID));
if($existingTag->count()) {
//if tag already exists we will simply add it to this post.
$tagObject = $existingTag->First();