mirror of
https://github.com/daniviga/bite.git
synced 2024-11-22 21:16:12 +01:00
Move to Django 3.1
This commit is contained in:
parent
b1d0f35cf7
commit
5c6736a817
19
bite/telemetry/migrations/0009_auto_20200823_1340.py
Normal file
19
bite/telemetry/migrations/0009_auto_20200823_1340.py
Normal file
|
@ -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]),
|
||||
),
|
||||
]
|
|
@ -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']
|
||||
|
|
Loading…
Reference in New Issue
Block a user