Skip to content

Commit

Permalink
PR FIXUP - Cleanup txn var
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewSisley committed Jun 14, 2024
1 parent 821d9d7 commit 67ec006
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions internal/db/collection_define.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ func (db *db) createCollections(
return nil, err
}

for i, def := range newDefinitions {
txn := mustGetContextTxn(ctx)
txn := mustGetContextTxn(ctx)

for i, def := range newDefinitions {
schemaByName := map[string]client.SchemaDescription{}
for _, existingDefinition := range existingDefinitions {
schemaByName[existingDefinition.Schema.Name] = existingDefinition.Schema
Expand All @@ -57,7 +57,6 @@ func (db *db) createCollections(

for _, def := range newDefinitions {
desc := def.Description
txn := mustGetContextTxn(ctx)

if desc.Name.HasValue() {
exists, err := description.HasCollectionByName(ctx, txn, desc.Name.Value())
Expand Down

0 comments on commit 67ec006

Please sign in to comment.