Skip to content

Commit

Permalink
Ensure the migration runs only once via BaseObject and not its subcla…
Browse files Browse the repository at this point in the history
…sses
  • Loading branch information
michalkleiner committed Mar 28, 2021
1 parent c4c78bf commit 0039e6d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Models/BaseObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@ public function requireDefaultRecords()
{
parent::requireDefaultRecords();

AT4xMigrationTask::migrate();
if (static::class === self::class) {
AT4xMigrationTask::migrate();
}
}
}

0 comments on commit 0039e6d

Please sign in to comment.