Fixed delete logs

This commit is contained in:
Dimitris Zlatanidis 2023-01-04 19:20:26 +02:00
parent 5a9e1ad634
commit 34a49ac076

View file

@ -44,10 +44,12 @@ class RemovePackages:
start = time.time()
self.remove_packages()
self.delete_main_logs()
if self.dependencies and '--resolve-off' not in self.flags:
self.delete_deps_logs()
self.delete_main_logs()
elapsed_time = time.time() - start
self.utils.finished_time(elapsed_time)
@ -67,7 +69,7 @@ class RemovePackages:
def delete_deps_logs(self):
""" Deletes depends packages from logs. """
for pkg in self.dependencies[0].split():
for pkg in self.dependencies:
self.session.query(LogsDependencies).filter(
LogsDependencies.name == pkg).delete()
self.session.commit()