diff --git a/github/resource_github_branch_protection_v3_utils.go b/github/resource_github_branch_protection_v3_utils.go index 180b099ce9..14e2e89acb 100644 --- a/github/resource_github_branch_protection_v3_utils.go +++ b/github/resource_github_branch_protection_v3_utils.go @@ -50,12 +50,7 @@ func flattenAndSetRequiredStatusChecks(d *schema.ResourceData, protection *githu for _, chk := range rsc.Checks { chkMap := make(map[string]interface{}) chkMap["context"] = chk.Context - chkMap["app_id"] = func() int { - if chk.AppID != nil { - return int(*chk.AppID) - } - return -1 - }() + chkMap["app_id"] = chk.GetAppID() checks = append(checks, chkMap) }