Skip to content

Commit

Permalink
Tweak setting to disable postgis
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanseymour committed Jan 16, 2025
1 parent 7ef4cac commit 86d6515
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:

- name: Initialize environment
env:
POSTGIS: 'OFF'
POSTGIS: 'off'
run: |
poetry install --no-root
yarn install
Expand All @@ -88,7 +88,7 @@ jobs:
- name: Run tests
env:
POSTGIS: 'OFF'
POSTGIS: 'off'
run: |
poetry run coverage run manage.py test --keepdb --noinput --verbosity=2
poetry run coverage report -i
Expand Down
7 changes: 4 additions & 3 deletions temba/settings_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@

DATA_UPLOAD_MAX_NUMBER_FIELDS = 2500 # needed for exports of big workspaces

# Temp workaround to allow running migrations without PostGIS
POSTGIS = os.getenv("POSTGIS") != "OFF"

# -----------------------------------------------------------------------------------
# Tests
# -----------------------------------------------------------------------------------
Expand Down Expand Up @@ -630,6 +627,10 @@
# -----------------------------------------------------------------------------------
# Database
# -----------------------------------------------------------------------------------

# temp workaround to allow running migrations without PostGIS
POSTGIS = os.getenv("POSTGIS", "") != "off"

_default_database_config = {
"ENGINE": "django.contrib.gis.db.backends.postgis" if POSTGIS else "django.db.backends.postgresql",
"NAME": "temba",
Expand Down

0 comments on commit 86d6515

Please sign in to comment.