changeset 434:f6a225476165

pgsql: fixed `setConfiguration` when an updated field value is the same as current one
author Goffi <goffi@goffi.org>
date Thu, 04 Feb 2021 09:38:17 +0100
parents 920440200570
children 96342e7e9f5d
files sat_pubsub/pgsql_storage.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/sat_pubsub/pgsql_storage.py	Thu Jan 14 17:59:23 2021 +0100
+++ b/sat_pubsub/pgsql_storage.py	Thu Feb 04 09:38:17 2021 +0100
@@ -554,9 +554,9 @@
                 raise BadRequest(text=f"Invalid option: {option!r}")
 
         for option in to_delete:
-            options.remove(option)
+            del options.fields[option]
 
-        if not options:
+        if not options.fields:
             return
 
         if options.get(const.OPT_MAX_ITEMS) == "max":