Skip to content

Commit

Permalink
Merge pull request #867 from creative-commoners/pulls/7/no-keyword-self
Browse files Browse the repository at this point in the history
ENH Don't use keyword self
  • Loading branch information
emteknetnz authored Jul 29, 2024
2 parents 411c1e2 + 8c9745e commit b7ed95b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Extension/FluentVersionedExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ public function onAfterDuplicate($original, $doWrite, $relations): void
$toID = $this->owner->ID;

// Get localised table
$localisedTable = $this->getLocalisedTable($tableName) . self::SUFFIX_VERSIONS;
$localisedTable = $this->getLocalisedTable($tableName) . FluentVersionedExtension::SUFFIX_VERSIONS;

// Remove existing translation versions from duplicated object
DB::prepared_query("DELETE FROM \"$localisedTable\" WHERE \"RecordID\" = ?", [$toID]);
Expand All @@ -1039,7 +1039,7 @@ public function onAfterDuplicate($original, $doWrite, $relations): void
WHERE \"RecordID\" = ?", [$toID, $fromID]);

// Also copy versions of base record
$versionsTableName = $tableName . self::SUFFIX_VERSIONS;
$versionsTableName = $tableName . FluentVersionedExtension::SUFFIX_VERSIONS;

// Remove existing versions from duplicated object, created by onBeforeWrite
DB::prepared_query("DELETE FROM \"$versionsTableName\" WHERE \"RecordID\" = ?", [$toID]);
Expand Down

0 comments on commit b7ed95b

Please sign in to comment.