Preload record values for DeleteByID

This commit is contained in:
Tomaž Jerman
2019-11-12 10:06:43 +01:00
parent a9785c921f
commit b67f6146f6
+5
View File
@@ -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