Skip to content

Commit

Permalink
Release v1.22.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dennissiemensma committed Jul 22, 2018
1 parent baa2141 commit 86b318b
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 5 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.22.1 - 2018-07-22
^^^^^^^^^^^^^^^^^^^^

**Tickets resolved in this release:**

- [`#506 <https://github.com/dennissiemensma/dsmr-reader/issues/506>`_] Fasen-grafiek hangt op 'loading'



v1.22.0 - 2018-07-22
^^^^^^^^^^^^^^^^^^^^

Expand Down
3 changes: 2 additions & 1 deletion docs/credits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Listed in any order, sorted by name.
- `raoulteeuwen <https://github.com/raoulteeuwen>`_
- `Sander de Leeuw <https://www.linkedin.com/in/sander-de-leeuw-58313aa0>`_
- `Sevickson <https://github.com/sevickson>`_
- `TampertK <https://github.com/TampertK>`_
- `ThinkPadNL <https://github.com/ThinkPadNL>`_
- `thommy101 <https://github.com/thommy101>`_
- `TopdRob <https://github.com/TopdRob>`_
Expand All @@ -63,7 +64,7 @@ Listed in any order, sorted by name.
- `WatskeBart <https://github.com/WatskeBart>`_
- `xirixiz <https://github.com/xirixiz>`_


Software used
-------------
Please note and respect their licences as well, if any. Credits to the following software and projects:
Expand Down
8 changes: 8 additions & 0 deletions dsmr_frontend/tests/webinterface/test_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,14 @@ def test_dashboard_xhr_electricity(self, now_mock):
}
)

# Fix for bug #506.
ElectricityConsumption.objects.update(phase_currently_delivered_l1=None)
response = self.client.get(
reverse('{}:dashboard-xhr-electricity'.format(self.namespace)),
data={'delivered': True, 'returned': True, 'phases': True}
)
self.assertEqual(response.status_code, 200, response.content)

@mock.patch('django.utils.timezone.now')
def test_dashboard_xhr_gas(self, now_mock):
now_mock.return_value = timezone.make_aware(timezone.datetime(2018, 7, 1))
Expand Down
7 changes: 4 additions & 3 deletions dsmr_frontend/views/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,10 @@ def get(self, request): # noqa: C901
data['currently_returned'].append(float(current.currently_returned) * 1000)

if form.cleaned_data.get('phases'):
data['phases_delivered']['l1'].append(float(current.phase_currently_delivered_l1) * 1000)
data['phases_delivered']['l2'].append(float(current.phase_currently_delivered_l2) * 1000)
data['phases_delivered']['l3'].append(float(current.phase_currently_delivered_l3) * 1000)
# 'or 0' is required due to empty data.
data['phases_delivered']['l1'].append(float(current.phase_currently_delivered_l1 or 0) * 1000)
data['phases_delivered']['l2'].append(float(current.phase_currently_delivered_l2 or 0) * 1000)
data['phases_delivered']['l3'].append(float(current.phase_currently_delivered_l3 or 0) * 1000)

if form.cleaned_data.get('returned'):
# 'or 0' is required due to backwards compatibility.
Expand Down
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, 22, 0, 'final', 0)
VERSION = (1, 22, 1, 'final', 0)

__version__ = get_version(VERSION)

0 comments on commit 86b318b

Please sign in to comment.