Skip to content

Commit 2b60ff8

Browse files
committed
use helper func
Signed-off-by: Mauritz Uphoff <mauritz.uphoff@stackit.cloud>
1 parent cad266e commit 2b60ff8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • stackit/internal/services/authorization/roleassignments

stackit/internal/services/authorization/roleassignments/resource.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,11 +303,11 @@ func toCreatePayload(model *Model, apiName *string) (*authorization.AddMembersPa
303303
return nil, fmt.Errorf("nil model")
304304
}
305305

306-
if model.Role.IsUnknown() || model.Role.ValueString() == "" {
306+
if utils.IsUndefined(model.Role) || model.Role.ValueString() == "" {
307307
return nil, fmt.Errorf("invalid model role")
308308
}
309309

310-
if model.Subject.IsUnknown() || model.Subject.ValueString() == "" {
310+
if utils.IsUndefined(model.Subject) || model.Subject.ValueString() == "" {
311311
return nil, fmt.Errorf("invalid model subject")
312312
}
313313

0 commit comments

Comments
 (0)