Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions pkg/model/crd.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,10 +384,11 @@ func (r *CRD) GetPrimaryKeyField() (*Field, error) {

fieldNames := names.New(fieldName)
fPath := fieldNames.Camel
var notFound bool
primaryField, notFound = r.Fields[fPath]
if !notFound {
return nil, fmt.Errorf("what the frick")
var found bool
primaryField, found = r.Fields[fPath]
if !found {
return nil, fmt.Errorf("could not find field with path " + fPath +
" for primary key " + fieldName)
}
}
return primaryField, nil
Expand Down