Revert "Revert "Revert "fixed LOG style errors"""

This reverts commit d21838959f.
This commit is contained in:
Matthias Mair 2023-09-28 13:59:48 +02:00
parent d21838959f
commit 3881923c0b
No known key found for this signature in database
GPG Key ID: A593429DDA23B66A
3 changed files with 4 additions and 4 deletions

View File

@ -74,7 +74,7 @@ class InvenTreeConfig(AppConfig):
try:
Schedule.objects.filter(func__in=obsolete).delete()
except Exception:
logger.exception("Failed to remove obsolete tasks - database not ready")
logger.error("Failed to remove obsolete tasks - database not ready")
def start_background_tasks(self):
"""Start all background tests for InvenTree."""

View File

@ -186,7 +186,7 @@ class LabelConfig(AppConfig):
if model.objects.filter(label=filename).exists():
return # pragma: no cover
except Exception:
logger.exception("Failed to query label for '%s' - you should run 'invoke update' first!", filename)
logger.error(f"Failed to query label for '{filename}' - you should run 'invoke update' first!")
logger.info("Creating entry for %s '%s'", model, label['name'])

View File

@ -60,10 +60,10 @@ class PartConfig(AppConfig):
if items.count() > 0:
# Find any pricing objects which have the 'scheduled_for_update' flag set
logger.info("Resetting update flags for %s pricing objects...", items.count())
logger.info(f"Resetting update flags for {items.count()} pricing objects...")
for pricing in items:
pricing.scheduled_for_update = False
pricing.save()
except Exception:
logger.exception("Failed to reset pricing flags - database not ready")
logger.error("Failed to reset pricing flags - database not ready")