From 67532b86ffc036f77b35fbb914188863500fcfb0 Mon Sep 17 00:00:00 2001 From: Denis Arh Date: Thu, 10 Jan 2019 19:26:34 +0100 Subject: [PATCH] Allow no primary module for triggers --- crm/rest/trigger.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/crm/rest/trigger.go b/crm/rest/trigger.go index 1faca0c12..6248ec57f 100644 --- a/crm/rest/trigger.go +++ b/crm/rest/trigger.go @@ -61,10 +61,7 @@ func (ctrl *Trigger) Edit(ctx context.Context, r *request.TriggerEdit) (interfac trigger.Actions = r.Actions trigger.Enabled = r.Enabled trigger.Source = r.Source - - if r.ModuleID > 0 { - trigger.ModuleID = r.ModuleID - } + trigger.ModuleID = r.ModuleID return ctrl.trigger.With(ctx).Update(trigger) }