Skip to content

Commit

Permalink
Optimised
Browse files Browse the repository at this point in the history
  • Loading branch information
nikam14 authored Sep 24, 2024
1 parent f8f1d69 commit c30ec3d
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,14 @@ public CompletableFuture<SchemaAndMetadata> getSchema(String schemaId, SchemaVer
.thenApply(Functions::schemaInfoToSchema)
.thenApply(schema -> new SchemaAndMetadata(schemaId, schema, stored.version))
.thenApply((schema) -> {
if (schema != null && schema.schema.isDeleted()) {
return null;
} else {
return schema;
if(version == SchemaVersion.Latest){
if (schema != null && schema.schema.isDeleted()) {
return null;
} else {
return schema;
}
}
return schema;
});
}
})
Expand Down

0 comments on commit c30ec3d

Please sign in to comment.