From 4cdf0ae9276a8d71afef11b3de3bb12c8049b2cf Mon Sep 17 00:00:00 2001 From: Jonas Vuitton Date: Thu, 6 Jan 2022 18:30:17 +0100 Subject: [PATCH 1/2] docs: loop over table_data in custom middleware --- docs/extend.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/extend.rst b/docs/extend.rst index c58ff259..80422020 100644 --- a/docs/extend.rst +++ b/docs/extend.rst @@ -115,7 +115,7 @@ Now let's implement that: for table_name in data: table_data = data[table_name] - for doc_id in table: + for doc_id in table_data: item = table_data[doc_id] if item == {}: From d0427fa940ad89508a6e51b7ba2125eaddf1d0d7 Mon Sep 17 00:00:00 2001 From: Jonas Vuitton Date: Thu, 6 Jan 2022 18:30:35 +0100 Subject: [PATCH 2/2] docs: fix call to super() in custom middleware --- docs/extend.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/extend.rst b/docs/extend.rst index 80422020..babbdaca 100644 --- a/docs/extend.rst +++ b/docs/extend.rst @@ -107,7 +107,7 @@ Now let's implement that: def __init__(self, storage_cls): # Any middleware *has* to call the super constructor # with storage_cls - super(self).__init__(storage_cls) # (1) + super().__init__(storage_cls) # (1) def read(self): data = self.storage.read()