3
0

Remove enabled setting on record deduplication

This commit is contained in:
Peter Grlica
2023-12-22 12:13:23 +01:00
parent 85ae51bf20
commit cbdad33e1c
3 changed files with 4 additions and 8 deletions
+1 -5
View File
@@ -2025,11 +2025,7 @@ func (svc record) DupDetection(ctx context.Context, m *types.Module, rec *types.
config = m.Config.RecordDeDup
)
if !config.Enabled {
return
}
if len(config.Rules) > 0 {
if len(config.Rules) > 0 && config.Rules.Validate() == nil {
records, _, err = svc.Find(ctx, types.RecordFilter{
ModuleID: m.ID,
NamespaceID: m.NamespaceID,
-2
View File
@@ -90,8 +90,6 @@ type (
}
ModuleConfigRecordDeDup struct {
Enabled bool `json:"enabled"`
// strictly restrict record saving
// otherwise show a warning with list of duplicated records
Strict bool `json:"-"`