From e93101c8a9fe35c9a0bc3bb4299fdc556e6fba9f 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 --- dashboard/src/api/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'dashboard') diff --git a/dashboard/src/api/models.py b/dashboard/src/api/models.py index f1e9130..7448ac4 100644 --- a/dashboard/src/api/models.py +++ b/dashboard/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