Fix record ref updates

This commit is contained in:
Tomaž Jerman
2021-03-31 10:16:26 +02:00
parent 1edb005fe2
commit eb79b192be
2 changed files with 113 additions and 0 deletions
+7
View File
@@ -861,6 +861,13 @@ func (svc record) procUpdate(ctx context.Context, s store.Storer, invokerID uint
// Mark all values as updated (new)
upd.Values.SetUpdatedFlag(true)
// First sanitization
//
// Before values are merged with existing data and
// sent to automation scripts (if any)
// we need to make sure it does not get sanitized data
upd.Values = svc.sanitizer.Run(m, upd.Values)
// Copy values to updated record
// to make sure nobody slips in something we do not want
upd.CreatedAt = old.CreatedAt