feat: update mapping functions to include region and improve error handling
This commit is contained in:
parent
936ad54f95
commit
c96328060d
2 changed files with 206 additions and 92 deletions
|
|
@ -21,7 +21,7 @@ func mapFields(
|
|||
return fmt.Errorf("id not present")
|
||||
}
|
||||
if model == nil {
|
||||
return fmt.Errorf("model input is nil")
|
||||
return fmt.Errorf("model given is nil")
|
||||
}
|
||||
|
||||
var databaseId int64
|
||||
|
|
@ -36,6 +36,7 @@ func mapFields(
|
|||
model.Id = types.Int64Value(databaseId)
|
||||
model.Name = types.StringPointerValue(source.Name)
|
||||
model.Owner = types.StringPointerValue(cleanString(source.Owner))
|
||||
model.Region = types.StringValue(region)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue