Skip to content

Commit a1cf724

Browse files
committed
Fix credential field parsing error
- Correctly assigns credential field values during item data source processing. - Removes redundant logic that incorrectly parsed "credential" fields.
1 parent bb93d7c commit a1cf724

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

internal/provider/onepassword_item_data_source.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -375,12 +375,10 @@ func (d *OnePasswordItemDataSource) Read(ctx context.Context, req datasource.Rea
375375
data.PublicKey = types.StringValue(f.Value)
376376
case "private key":
377377
data.PrivateKey = types.StringValue(f.Value)
378+
case "credential":
379+
data.Credential = types.StringValue(f.Value)
378380
}
379381
}
380-
381-
if f.ID == "credential" && item.Category == "API_CREDENTIAL" {
382-
data.Credential = types.StringValue(f.Value)
383-
}
384382
}
385383
}
386384

0 commit comments

Comments
 (0)