mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Replace print statement with a logger warning
This commit is contained in:
parent
8662e6a109
commit
f96051d863
@ -26,6 +26,11 @@ from django.core.exceptions import ValidationError
|
|||||||
import InvenTree.helpers
|
import InvenTree.helpers
|
||||||
import InvenTree.fields
|
import InvenTree.fields
|
||||||
|
|
||||||
|
import logging
|
||||||
|
|
||||||
|
|
||||||
|
logger = logging.getLogger('inventree')
|
||||||
|
|
||||||
|
|
||||||
class BaseInvenTreeSetting(models.Model):
|
class BaseInvenTreeSetting(models.Model):
|
||||||
"""
|
"""
|
||||||
@ -1040,7 +1045,7 @@ class PriceBreak(models.Model):
|
|||||||
try:
|
try:
|
||||||
converted = convert_money(self.price, currency_code)
|
converted = convert_money(self.price, currency_code)
|
||||||
except MissingRate:
|
except MissingRate:
|
||||||
print(f"WARNING: No currency conversion rate available for {self.price_currency} -> {currency_code}")
|
logger.warning(f"No currency conversion rate available for {self.price_currency} -> {currency_code}")
|
||||||
return self.price.amount
|
return self.price.amount
|
||||||
|
|
||||||
return converted.amount
|
return converted.amount
|
||||||
|
Loading…
Reference in New Issue
Block a user