Skip to content

Commit

Permalink
Merge pull request #30 from ambitioninc/develop
Browse files Browse the repository at this point in the history
3.1.2
  • Loading branch information
somewes authored Dec 11, 2018
2 parents bb08674 + 370738b commit 2c1f448
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 4 deletions.
4 changes: 4 additions & 0 deletions docs/release_notes.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Release Notes
=============

v3.1.2
------
* Fix django warning related to JSONField default value

v3.1.1
------
* Remove 1.10 from setup file
Expand Down
20 changes: 20 additions & 0 deletions issue/migrations/0004_auto_20181210_1857.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by Django 2.1.4 on 2018-12-10 18:57

import django.contrib.postgres.fields.jsonb
import django.core.serializers.json
from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('issue', '0003_auto_20180402_2126'),
]

operations = [
migrations.AlterField(
model_name='responderaction',
name='function_kwargs',
field=django.contrib.postgres.fields.jsonb.JSONField(default=dict, encoder=django.core.serializers.json.DjangoJSONEncoder),
),
]
2 changes: 1 addition & 1 deletion issue/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ class ResponderAction(models.Model):

# What action do we want to occur
target_function = models.TextField()
function_kwargs = JSONField(default={}, encoder=DjangoJSONEncoder)
function_kwargs = JSONField(default=dict, encoder=DjangoJSONEncoder)

def __str__(self):
return 'ResponderAction: {responder} - {target_function} - {function_kwargs}'.format(
Expand Down
4 changes: 2 additions & 2 deletions issue/tests/model_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def test_respond(self, load_function):
# Setup the scenario
target_function = 'do'
issue = G(Issue, name='error-42')
responder = G(Responder, issue=issue, watch_pattern='error-\d+')
responder = G(Responder, issue=issue, watch_pattern=r'error-\d+')
G(ResponderAction, responder=responder, target_function=target_function, delay_sec=0)

# Run the code
Expand All @@ -203,7 +203,7 @@ def test_respond(self, load_function):
def test_respond_ignores_non_watching_pattern(self, load_function):
# Setup the scenario
issue = G(Issue, name='success')
responder = G(Responder, issue=issue, watch_pattern='error-\d+')
responder = G(Responder, issue=issue, watch_pattern=r'error-\d+')
G(ResponderAction, responder=responder, target_function='do')

# Run the code
Expand Down
2 changes: 1 addition & 1 deletion issue/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '3.1.1'
__version__ = '3.1.2'

0 comments on commit 2c1f448

Please sign in to comment.