diff --git a/compose/service/record.go b/compose/service/record.go index e8910843b..34053b10e 100644 --- a/compose/service/record.go +++ b/compose/service/record.go @@ -427,7 +427,7 @@ func (svc record) DeleteByID(namespaceID, recordID uint64) (err error) { return ErrNoDeletePermissions.withStack() } - if err = svc.sr.BeforeRecordCreate(svc.ctx, ns, m, r); err != nil { + if err = svc.sr.BeforeRecordDelete(svc.ctx, ns, m, r); err != nil { // Calling return }