Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fips issues #3484

Merged
merged 5 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions bims/migrations/0217_update_default_fbis_site_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@

fixture = 'survey_data'

def load_fixture(apps, schema_editor):
call_command('add_default_fbis_location_site_view')


class Migration(migrations.Migration):

Expand All @@ -17,5 +14,4 @@ class Migration(migrations.Migration):
]

operations = [
migrations.RunPython(load_fixture),
]
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

from django.conf import settings
from django.db import migrations, models
from django.core.management import call_command
import django.db.models.deletion

def load_fixture(apps, schema_editor):
call_command('add_default_fbis_location_site_view')


class Migration(migrations.Migration):

Expand Down Expand Up @@ -33,4 +37,5 @@ class Migration(migrations.Migration):
name='uploader',
field=models.ForeignKey(blank=True, help_text='User who uploaded the taxon image (Optional)', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='taxon_image_uploader', to=settings.AUTH_USER_MODEL),
),
migrations.RunPython(load_fixture),
]
2 changes: 1 addition & 1 deletion bims/templates/map_page/dashboard-templates.html
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ <h2 class="dashboard-header" style="margin-left: 15px; margin-right: 15px">
<div class="col-4 title_column">Records</div>
<div class="col-8"><%= count %></div>
</div>
<% if (additional_data["BDI Link"]) { %>
<% if (additional_data && additional_data["BDI Link"]) { %>
<div class="row">
<div class="col-4 title_column">BDI Link</div>
<div class="col-8">
Expand Down
2 changes: 1 addition & 1 deletion bims/templates/map_page/map-templates.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
</td>
</tr>
<% } %>
<% if (additional_data["BDI Link"]) { %>
<% if (additional_data && additional_data["BDI Link"]) { %>
<tr class="species-detail-row">
<td class="species-detail-cell cell-header">
BDI Link
Expand Down
4 changes: 4 additions & 0 deletions core/settings/prod.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@
SERVER_EMAIL = os.environ.get('ADMIN_EMAILS', 'admin@kartoza.com')
EMAIL_HOST = 'kartoza.com'
DEFAULT_FROM_EMAIL = os.environ.get('ADMIN_EMAILS', 'admin@kartoza.com')

CSRF_TRUSTED_ORIGINS = ast.literal_eval(
os.environ.get('CSRF_TRUSTED_ORIGINS', '["*"]')
)
1 change: 1 addition & 0 deletions deployment/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ x-common-django:
- STATIC_ROOT=/home/web/static/static
- VIRTUAL_HOST=bims.kartoza.com
- VIRTUAL_PORT=8080
- CSRF_TRUSTED_ORIGINS=['django-bims.test']
volumes:
- static-data:/home/web/static
- media-data:/home/web/media
Expand Down
Loading