Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
Looks like we cannot import app models
in settings because during code initialization
the settings runs before the apps are loaded
which throws error.
  • Loading branch information
superryeti committed Apr 24, 2023
1 parent 17c3791 commit b655aca
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions physionet-django/physionet/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

from decouple import config, UndefinedValueError

from project.models import DataSource

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
Expand Down Expand Up @@ -615,5 +614,5 @@ class StorageTypes:
# minimum number of word needed for research_summary field for Credentialing Model.
MIN_WORDS_RESEARCH_SUMMARY_CREDENTIALING = config('MIN_WORDS_RESEARCH_SUMMARY_CREDENTIALING', cast=int, default=20)

DEFAULT_PROJECT_DATA_LOCATION = config('DEFAULT_PROJECT_DATA_LOCATION', default=DataSource.DataLocation.DIRECT)
DEFAULT_PROJECT_DATA_LOCATION = config('DEFAULT_PROJECT_DATA_LOCATION', default='DI')
DEFAULT_PROJECT_ACCESS_MECHANISM = config('DEFAULT_PROJECT_ACCESS_MECHANISM', default=None)

0 comments on commit b655aca

Please sign in to comment.