From a5c455a30536715f9e53b894907fefbb74c77d54 Mon Sep 17 00:00:00 2001 From: Arksine Date: Sun, 14 Mar 2021 15:55:08 -0400 Subject: [PATCH] history: return removed item in NamespaceWrapper.delete() This is required for the "pop" functionality to work correctly. Signed-off-by: Eric Callahan --- moonraker/plugins/database.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moonraker/plugins/database.py b/moonraker/plugins/database.py index bd3ca43..af0867c 100644 --- a/moonraker/plugins/database.py +++ b/moonraker/plugins/database.py @@ -338,7 +338,7 @@ class NamespaceWrapper: def delete(self, key): if isinstance(key, str) and not self.parse_keys: key = [key] - self.db.delete_item(self.namespace, key) + return self.db.delete_item(self.namespace, key) def __len__(self): return self.db.ns_length(self.namespace)