Skip to content

Commit

Permalink
fix(upgrade): fix upgrade npe (datahub-project#10436)
Browse files Browse the repository at this point in the history
  • Loading branch information
david-leifker authored and sleeperdeep committed Jun 25, 2024
1 parent 4c75ac2 commit 8073ad7
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import com.linkedin.metadata.entity.EntityService;
import com.linkedin.metadata.entity.EntityUtils;
import com.linkedin.metadata.entity.restoreindices.RestoreIndicesArgs;
import com.linkedin.metadata.models.AspectSpec;
import com.linkedin.metadata.utils.AuditStampUtils;
import com.linkedin.util.Pair;
import io.datahubproject.metadata.context.OperationContext;
Expand Down Expand Up @@ -77,9 +76,6 @@ public Function<UpgradeContext, UpgradeStepResult> executable() {
args = args.urnLike(getUrnLike());
}

final AspectSpec aspectSpec =
opContext.getEntityRegistry().getAspectSpecs().get(getAspectName());

aspectDao
.streamAspectBatches(args)
.forEach(
Expand All @@ -98,7 +94,7 @@ public Function<UpgradeContext, UpgradeStepResult> executable() {
systemAspect.getUrn(),
systemAspect.getUrn().getEntityType(),
getAspectName(),
aspectSpec,
systemAspect.getAspectSpec(),
null,
systemAspect.getRecordTemplate(),
null,
Expand Down

0 comments on commit 8073ad7

Please sign in to comment.