Don't change the trigger icon back to "enabled" when the trigger is updated when it's disabled. Fixes #2271

This commit is contained in:
Murtuza Zabuawala 2017-05-10 09:48:21 +01:00 committed by Dave Page
parent 9452e0699e
commit 94cbd70370

View File

@ -753,7 +753,8 @@ class TriggerView(PGChildNodeView):
new_trid,
tid,
name,
icon="icon-%s" % self.node_type
icon="icon-%s" % self.node_type if self.is_trigger_enabled
else "icon-%s-bad" % self.node_type
)
)
except Exception as e:
@ -844,6 +845,7 @@ class TriggerView(PGChildNodeView):
self.trigger_name = data['name']
self.lanname = old_data['lanname']
self.is_trigger_enabled = old_data['is_enable_trigger']
old_data = self.get_trigger_function_schema(old_data)