Skip to content

Commit

Permalink
Mailbackup triggered elke halve minuut na v2.13+ update
Browse files Browse the repository at this point in the history
  • Loading branch information
dennissiemensma committed Jan 7, 2020
1 parent 151f364 commit b1f5c04
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 2 deletions.
9 changes: 9 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ Changelog
=========


v2.14.1 - 2020-01-07


- [`#827 <https://github.com/dennissiemensma/dsmr-reader/issues/827>`_] Mailbackup triggered elke halve minuut na v2.13+ update


----


v2.14.0 - 2020-01-07

.. note::
Expand Down
33 changes: 33 additions & 0 deletions dsmr_backend/migrations/0012_fix_email_from.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Generated by Django 2.2.9 on 2020-01-07 18:00

from django.db import migrations


class Migration(migrations.Migration):
def migrate_forward(apps, schema_editor):
"""
Fixes email not being sent when the new email_from field is empty.
"""
EmailSettings = apps.get_model('dsmr_backend', 'EmailSettings')
email_settings, _ = EmailSettings.objects.get_or_create()

# Already set.
if email_settings.email_from:
return

# No default.
if not email_settings.email_to:
return

EmailSettings.objects.all().update(email_from=email_settings.email_to)

def migrate_backward(apps, schema_editor):
pass # Nothing to do, but allow going backwards.

dependencies = [
('dsmr_backend', '0011_disable_capabilities'),
]

operations = [
migrations.RunPython(migrate_forward, migrate_backward),
]
2 changes: 1 addition & 1 deletion dsmrreader/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.utils.version import get_version

VERSION = (2, 14, 0, 'final', 0)
VERSION = (2, 14, 1, 'final', 0)

__version__ = get_version(VERSION)
1 change: 0 additions & 1 deletion dsmrreader/locales/nl/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ msgid ""
msgstr ""
"Project-Id-Version: DSMR Reader\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-01-05 22:45+0100\n"
"Last-Translator: Dennis Siemensma <[email protected]>\n"
"Language-Team: Dennis Siemensma <[email protected]>\n"
"Language: nl\n"
Expand Down
File renamed without changes.
15 changes: 15 additions & 0 deletions dsmrreader/provisioning/downgrade/v2.14.1.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

# Dump for DSMR-reader v2.14.1
./manage.py migrate dsmr_api 0003_create_api_user
./manage.py migrate dsmr_backend 0012_fix_email_from
./manage.py migrate dsmr_backup 0007_remove_backupsettings_compress
./manage.py migrate dsmr_consumption 0012_add_voltage_indexes
./manage.py migrate dsmr_datalogger 0017_log_telegrams
./manage.py migrate dsmr_frontend 0026_v2140_release
./manage.py migrate dsmr_mindergas 0005_schedule_mindergas_export
./manage.py migrate dsmr_mqtt 0013_process_sleep
./manage.py migrate dsmr_notification 0007_support_for_telegram
./manage.py migrate dsmr_pvoutput 0002_pvoutput_latest_sync
./manage.py migrate dsmr_stats 0013_all_time_low
./manage.py migrate dsmr_weather 0006_schedule_weather_update

0 comments on commit b1f5c04

Please sign in to comment.