Merge pull request #1860 from matmair/fix-for-1775

fix for phantom migration warning
This commit is contained in:
Oliver 2021-07-24 10:07:07 +10:00 committed by GitHub
commit bcfb3ac067
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,7 +56,7 @@ class InvenTreeModelMoneyField(ModelMoneyField):
def __init__(self, **kwargs):
# detect if creating migration
if 'makemigrations' in sys.argv:
if 'migrate' in sys.argv or 'makemigrations' in sys.argv:
# remove currency information for a clean migration
kwargs['default_currency'] = ''
kwargs['currency_choices'] = []