Mercurial > libervia-pubsub
comparison sat_pubsub/pgsql_storage.py @ 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 | b5e1e8d93dd4 |
comparison
equal
deleted
inserted
replaced
433:920440200570 | 434:f6a225476165 |
---|---|
552 to_delete.append(option) | 552 to_delete.append(option) |
553 except KeyError: | 553 except KeyError: |
554 raise BadRequest(text=f"Invalid option: {option!r}") | 554 raise BadRequest(text=f"Invalid option: {option!r}") |
555 | 555 |
556 for option in to_delete: | 556 for option in to_delete: |
557 options.remove(option) | 557 del options.fields[option] |
558 | 558 |
559 if not options: | 559 if not options.fields: |
560 return | 560 return |
561 | 561 |
562 if options.get(const.OPT_MAX_ITEMS) == "max": | 562 if options.get(const.OPT_MAX_ITEMS) == "max": |
563 # XXX: "max" is default value for config we must convert | 563 # XXX: "max" is default value for config we must convert |
564 # it to an interger. See backend's _doSetNodeConfiguration comment | 564 # it to an interger. See backend's _doSetNodeConfiguration comment |