From 7045ad911e2322d623b6a2f4d8cc017208449baf Mon Sep 17 00:00:00 2001 From: redxef Date: Tue, 6 Dec 2022 19:05:48 +0100 Subject: [PATCH] Ensure all methods called are the private ones. --- radicale_sql/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/radicale_sql/__init__.py b/radicale_sql/__init__.py index df008c1..361a4cb 100644 --- a/radicale_sql/__init__.py +++ b/radicale_sql/__init__.py @@ -308,6 +308,8 @@ class Collection(BaseCollection): connection.execute(delete_stmt) def _sync(self, *, connection, old_token: str = '') -> Tuple[str, Iterable[str]]: + # Parts of this method have been taken from + # https://github.com/Kozea/Radicale/blob/6a56a6026f6ec463d6eb77da29e03c48c0c736c6/radicale/storage/multifilesystem/sync.py _prefix = 'http://radicale.org/ns/sync/' collection_state_table = self._storage._meta.tables['collection_state'] def check_token_name(token_name: str) -> bool: @@ -330,7 +332,7 @@ class Collection(BaseCollection): # compute new state for href, item in itertools.chain( - ((item.href, item) for item in self.get_all()), + ((item.href, item) for item in self._get_all(connection=connection)), ((href, None) for href in self._get_deleted_history_refs(connection=connection)) ): assert isinstance(href, str)