Verified Commit 43bf27e0 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Fix tests

parent 8c95f5f1
......@@ -15,7 +15,6 @@ services:
- 8000:8000
depends_on:
- postgres
- redis
volumes:
- ./website:/usr/src/app/website/
- concrexit:/concrexit/
......@@ -27,5 +26,3 @@ services:
volumes:
concrexit:
driver: local
redis:
driver: local
# Generated by Django 2.1.3 on 2018-11-11 11:38
# Generated by Django 2.1.3 on 2018-11-11 12:19
from django.db import migrations, models
......@@ -19,4 +19,9 @@ class Migration(migrations.Migration):
name='executed',
field=models.DateTimeField(null=True),
),
migrations.AddField(
model_name='scheduledmessage',
name='scheduled',
field=models.BooleanField(default=True),
),
]
......@@ -77,7 +77,7 @@ class MessageManager(models.Manager):
def get_queryset(self):
return (super().get_queryset()
.filter(scheduledmessage__task_id=None))
.filter(scheduledmessage__scheduled=None))
class Message(models.Model, metaclass=ModelTranslateMeta):
......@@ -164,7 +164,7 @@ class Message(models.Model, metaclass=ModelTranslateMeta):
for reg_id in reg_ids:
message.token = reg_id
try:
messaging.send(message,dry_run=kwargs.get(
messaging.send(message, dry_run=kwargs.get(
'dry_run', False))
success_total += 1
except messaging.ApiCallError as e:
......@@ -196,5 +196,6 @@ class ScheduledMessage(Message, metaclass=ModelTranslateMeta):
objects = ScheduledMessageManager()
scheduled = models.BooleanField(default=True)
time = models.DateTimeField()
executed = models.DateTimeField(null=True)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment