2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-03-01 01:42:49 +00:00

Prevent exchange rate update during migration (#11429)

This commit is contained in:
Oliver
2026-02-26 19:18:44 +11:00
committed by GitHub
parent b18016e43e
commit fb3b1189fd

View File

@@ -587,7 +587,10 @@ def update_exchange_rates(force: bool = False):
Arguments: Arguments:
force: If True, force the update to run regardless of the last update time force: If True, force the update to run regardless of the last update time
""" """
from InvenTree.ready import canAppAccessDatabase from InvenTree.ready import canAppAccessDatabase, isRunningMigrations
if isRunningMigrations():
return
# Do not update exchange rates if we cannot access the database # Do not update exchange rates if we cannot access the database
if not canAppAccessDatabase(allow_test=True, allow_shell=True): if not canAppAccessDatabase(allow_test=True, allow_shell=True):