From b67f6146f6ef6a762b9b9f189b9ec1141c147612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toma=C5=BE=20Jerman?= Date: Tue, 12 Nov 2019 10:06:43 +0100 Subject: [PATCH] Preload record values for DeleteByID --- compose/service/record.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compose/service/record.go b/compose/service/record.go index 34053b10e..05b67f5e7 100644 --- a/compose/service/record.go +++ b/compose/service/record.go @@ -427,6 +427,11 @@ func (svc record) DeleteByID(namespaceID, recordID uint64) (err error) { return ErrNoDeletePermissions.withStack() } + // preloadValues should be pressent to load values for automation scripts + if err = svc.preloadValues(m, r); err != nil { + return + } + if err = svc.sr.BeforeRecordDelete(svc.ctx, ns, m, r); err != nil { // Calling return