mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Revert "Revert "Revert "fixed LOG style errors"""
This reverts commit d21838959f
.
This commit is contained in:
parent
d21838959f
commit
3881923c0b
@ -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."""
|
||||
|
@ -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'])
|
||||
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user