feat: jsonfield默认blank=True
This commit is contained in:
parent
983e11af74
commit
1b6c58e7c8
|
@ -0,0 +1,23 @@
|
|||
# Generated by Django 3.2.12 on 2024-02-28 08:18
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('enp', '0006_carwash_duration'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='drain',
|
||||
name='coordinates',
|
||||
field=models.JSONField(blank=True, default=dict, verbose_name='坐标'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='drainequip',
|
||||
name='params_list',
|
||||
field=models.JSONField(blank=True, default=list, verbose_name='监测参数列表'),
|
||||
),
|
||||
]
|
|
@ -36,7 +36,7 @@ class Drain(CommonBModel):
|
|||
pm_limit = models.FloatField('PM超低排放限值', default=10, help_text='单位:mg/m³')
|
||||
measure = models.CharField('治理措施', max_length=20, default='')
|
||||
# {"x": 1.0, "y": 2.0, "z": 3.0}
|
||||
coordinates = models.JSONField('坐标', default=dict, null=True)
|
||||
coordinates = models.JSONField('坐标', default=dict, blank=True)
|
||||
mgroup = models.ForeignKey(
|
||||
Mgroup, verbose_name='所属工段', on_delete=models.CASCADE)
|
||||
equipments = models.ManyToManyField(
|
||||
|
@ -51,7 +51,7 @@ class DrainEquip(BaseModel):
|
|||
Drain, verbose_name='排口', related_name='drainequip_drain', on_delete=models.CASCADE)
|
||||
equipment = models.ForeignKey(
|
||||
Equipment, verbose_name='关联设备', related_name='drainequip_equipment', on_delete=models.CASCADE)
|
||||
params_list = models.JSONField('监测参数列表', default=list, null=True)
|
||||
params_list = models.JSONField('监测参数列表', default=list, blank=True)
|
||||
dust_alarm = models.DecimalField(
|
||||
'颗粒物报警值', max_digits=10, decimal_places=4, null=True, blank=True)
|
||||
pm10_alarm = models.DecimalField(
|
||||
|
|
Loading…
Reference in New Issue