From 84b16668fcb0be4fe3d39f793e912676c4431cbd Mon Sep 17 00:00:00 2001 From: Parker Berberian Date: Wed, 17 Oct 2018 13:34:56 -0400 Subject: Fix clear_delta() function NetworkConfig.clear_delta() appeared to be a noop, but can set the delta to a nonempty string if delta is None. This reverts a change I made here: https://gerrit.opnfv.org/gerrit/#/c/63385/6..7/dashboard/src/api/models.py Change-Id: I72661ca9d889801fb6183943c8ae0e5e38cc960a Signed-off-by: Parker Berberian --- src/api/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/api/models.py b/src/api/models.py index f1e9130..7448ac4 100644 --- a/src/api/models.py +++ b/src/api/models.py @@ -488,7 +488,8 @@ class NetworkConfig(TaskConfig): return d def clear_delta(self): - pass + self.delta = json.dumps(self.to_dict()) + self.save() def add_interface(self, interface): self.interfaces.add(interface) -- cgit 1.2.3-korg