changeset 424:3fce48c0a44d

psql: fixed use of default value for max items in `setConfiguration`
author Goffi <goffi@goffi.org>
date Sat, 15 Aug 2020 22:53:53 +0200
parents af73d57829ed
children 968091cea547
files sat_pubsub/pgsql_storage.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/sat_pubsub/pgsql_storage.py	Mon Jun 01 12:24:39 2020 +0200
+++ b/sat_pubsub/pgsql_storage.py	Sat Aug 15 22:53:53 2020 +0200
@@ -531,6 +531,11 @@
             if option in config:
                 config[option] = options[option]
 
+        if config[const.OPT_MAX_ITEMS] == "max":
+            # XXX: "max" is default value for config we must convert
+            #   it to an interger. See backend's _doSetNodeConfiguration comment
+            config[const.OPT_MAX_ITEMS] = "0"
+
         d = self.dbpool.runInteraction(self._setConfiguration, config)
         d.addCallback(self._setCachedConfiguration, config)
         return d