Skip to content

Commit

Permalink
dont load tests models when making migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvw committed Nov 9, 2017
1 parent 3fbaef2 commit 0c6cf91
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion django_crypto_fields/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from edc_base.model_mixins import BaseUuidModel

from .model_mixins import CryptModelMixin
import sys


class Crypt(CryptModelMixin, BaseUuidModel):
Expand All @@ -10,5 +11,5 @@ class Meta(CryptModelMixin.Meta):
verbose_name = 'Crypt'


if settings.APP_NAME == 'django_crypto_fields':
if settings.APP_NAME == 'django_crypto_fields' and 'makemigrations' not in sys.argv:
from .tests import models

0 comments on commit 0c6cf91

Please sign in to comment.