Apply suggestions from code review

Co-authored-by: Steven Nguyen <1477010+stnguyen90@users.noreply.github.com>
This commit is contained in:
Christy Jacob 2023-09-06 18:06:31 -04:00 committed by GitHub
parent 1a0054890d
commit d96a6d7883
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -651,9 +651,9 @@ class V19 extends Migration
switch ($document->getCollection()) {
case 'attributes':
case 'indexes':
$status = $document->getAttribute('status', $document->getAttribute('status', ''));
$status = $document->getAttribute('status');
if ($status === 'failed') {
$document->setAttribute('error', 'Unknown problem');
$document->setAttribute('error', $document->getAttribute('error', 'Unknown problem'));
}
break;
case 'builds':