Skip to content

Commit

Permalink
Released v1.23.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dennissiemensma committed Aug 26, 2018
1 parent ec983aa commit 9a98c73
Show file tree
Hide file tree
Showing 5 changed files with 33 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 @@ -18,6 +18,15 @@ Please make sure you have a fresh **database backup** before upgrading! Upgradin



v1.23.1 - 2018-08-26
^^^^^^^^^^^^^^^^^^^^

**Tickets resolved in this release:**

- [`#515 <https://github.com/dennissiemensma/dsmr-reader/issues/515>`_] Missing mqtt values



v1.23.0 - 2018-08-02
^^^^^^^^^^^^^^^^^^^^

Expand Down
18 changes: 18 additions & 0 deletions dsmr_mqtt/migrations/0008_mqtt_null_payload.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 2.1 on 2018-08-26 12:30

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('dsmr_mqtt', '0007_mqtts'),
]

operations = [
migrations.AlterField(
model_name='message',
name='payload',
field=models.TextField(blank=True, null=True),
),
]
2 changes: 1 addition & 1 deletion dsmr_mqtt/models/queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class Message(models.Model):
""" Queued message for MQTT. """
topic = models.CharField(max_length=255)
payload = models.TextField()
payload = models.TextField(null=True, blank=True)

def __str__(self):
return self.topic
Expand Down
4 changes: 4 additions & 0 deletions dsmr_mqtt/tests/models/test_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ def test_admin(self):

def test_to_string(self):
self.assertEqual(str(self.instance), '{}'.format(self.instance.topic))

def test_null_payload(self):
""" This caused many headaches in issue #515. """
Message.objects.create(topic='x', payload=None)
2 changes: 1 addition & 1 deletion dsmrreader/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
from django.utils.version import get_version


VERSION = (1, 23, 0, 'final', 0)
VERSION = (1, 23, 1, 'final', 0)

__version__ = get_version(VERSION)

0 comments on commit 9a98c73

Please sign in to comment.