Updated for check db

This commit is contained in:
Dimitris Zlatanidis 2023-05-08 14:02:11 +03:00
parent 1e31222eb7
commit 312819af9a

View file

@ -76,12 +76,13 @@ class Check(Configs):
}
if self.repository == '*':
for repository in list(self.repos.repositories.keys()):
if self.utils.is_binary_repo(repository):
count: int = self.session.query(BinariesTable.id).where(
BinariesTable.repo == repository).count()
else:
count: int = self.session.query(sbo_table[repository].id).count()
for repository, enable in self.repos.repositories.items():
if enable[0]:
if self.utils.is_binary_repo(repository):
count += self.session.query(BinariesTable.id).where(
BinariesTable.repo == repository).count()
else:
count += self.session.query(sbo_table[repository].id).count()
else:
if self.is_binary:
count: int = self.session.query(BinariesTable.id).where(BinariesTable.repo == self.repository).count()