From 5c6736a817b53221e70aabcb470368cbef0e2d16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniele=20Vigan=C3=B2?= Date: Sun, 23 Aug 2020 15:44:17 +0200 Subject: [PATCH] Move to Django 3.1 --- .../migrations/0009_auto_20200823_1340.py | 19 +++++++++++++++++++ bite/telemetry/models.py | 3 +-- 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 bite/telemetry/migrations/0009_auto_20200823_1340.py diff --git a/bite/telemetry/migrations/0009_auto_20200823_1340.py b/bite/telemetry/migrations/0009_auto_20200823_1340.py new file mode 100644 index 0000000..9558f8c --- /dev/null +++ b/bite/telemetry/migrations/0009_auto_20200823_1340.py @@ -0,0 +1,19 @@ +# Generated by Django 3.1 on 2020-08-23 13:40 + +from django.db import migrations, models +import telemetry.models + + +class Migration(migrations.Migration): + + dependencies = [ + ('telemetry', '0008_auto_20200619_1627'), + ] + + operations = [ + migrations.AlterField( + model_name='telemetry', + name='payload', + field=models.JSONField(validators=[telemetry.models.telemetry_validation]), + ), + ] diff --git a/bite/telemetry/models.py b/bite/telemetry/models.py index 28b3d52..1e37c06 100644 --- a/bite/telemetry/models.py +++ b/bite/telemetry/models.py @@ -20,7 +20,6 @@ from django.db import models from django.core.validators import MinValueValidator from django.core.exceptions import ValidationError -from django.contrib.postgres.fields import JSONField from api.models import Device @@ -39,7 +38,7 @@ class Telemetry(models.Model): clock = models.IntegerField( validators=[MinValueValidator(0)], null=True) - payload = JSONField(validators=[telemetry_validation]) + payload = models.JSONField(validators=[telemetry_validation]) class Meta: ordering = ['-time', 'device']