Skip to content
This repository was archived by the owner on Jan 10, 2021. It is now read-only.

Commit d3f60d8

Browse files
author
Nathan Glasl
committed
Correcting an issue introduced in 3.2 where a tag ID was always coming back as being changed.
1 parent e6d92c0 commit d3f60d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

code/extensions/FusionExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function onAfterWrite() {
8383

8484
$changed = $this->owner->getChangedFields();
8585
$existing = FusionTag::get()->filter('Title', $this->owner->$write)->first();
86-
if(isset($changed['ID']) && !$existing) {
86+
if(is_null($this->owner->FusionTagID) && !$existing) {
8787

8888
// There is no fusion tag, therefore instantiate one using this tag.
8989

@@ -99,7 +99,7 @@ public function onAfterWrite() {
9999
$this->owner->FusionTagID = $fusion->ID;
100100
$this->owner->write();
101101
}
102-
else if(isset($changed['ID']) && $existing) {
102+
else if(is_null($this->owner->FusionTagID) && $existing) {
103103

104104
// There is a fusion tag, therefore append this tag type.
105105

0 commit comments

Comments
 (0)