1
0
Fork 0
mirror of synced 2024-07-02 05:00:33 +12:00

Skip migrating domains without project because it would throw an error

This commit is contained in:
Steven Nguyen 2023-09-02 18:06:50 -07:00
parent 03c2a16306
commit f317d33fc7
No known key found for this signature in database

View file

@ -56,6 +56,14 @@ class V19 extends Migration
$status = 'verified';
}
$projectId = $domain->getAttribute('projectId');
$projectInternalId = $domain->getAttribute('projectInternalId');
if (empty($projectId) || empty($projectInternalId)) {
Console::warning("Error migrating domain {$domain->getAttribute('domain')}: Missing projectId or projectInternalId");
continue;
}
$ruleDocument = new Document([
'projectId' => $domain->getAttribute('projectId'),
'projectInternalId' => $domain->getAttribute('projectInternalId'),