Merge pull request #394 from agentydragon/doc-for-fix-integrity

Add return value comment for fixIntegrity method of Collection
This commit is contained in:
Damien Elmes 2019-12-28 07:10:50 +10:00 committed by GitHub
commit 0799f50df0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -856,8 +856,12 @@ select id from notes where mid = ?) limit 1"""
return False return False
return True return True
def fixIntegrity(self) -> Tuple[Any, bool]: def fixIntegrity(self) -> Tuple[str, bool]:
"Fix possible problems and rebuild caches." """Fix possible problems and rebuild caches.
Returns tuple of (error: str, ok: bool). 'ok' will be true if no
problems were found.
"""
problems = [] problems = []
curs = self.db.cursor() curs = self.db.cursor()
self.save() self.save()