fix: opl level可为空

This commit is contained in:
caoqianming 2023-04-27 14:42:33 +08:00
parent e6933f9fc4
commit c2c05a5075
3 changed files with 21 additions and 2 deletions

View File

@ -1,3 +1,4 @@
from django.contrib import admin
from .models import Opl
# Register your models here.
admin.site.register(Opl)

View File

@ -0,0 +1,18 @@
# Generated by Django 3.2.12 on 2023-04-27 06:41
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('opm', '0011_alter_opl_level'),
]
operations = [
migrations.AlterField(
model_name='opl',
name='level',
field=models.CharField(blank=True, help_text='特技/三级/二级/主干道/次干道', max_length=20, null=True, verbose_name='作业级别'),
),
]

View File

@ -74,7 +74,7 @@ class Opl(CommonBDModel):
number = models.CharField('作业许可编号', max_length=20, null=True, blank=True)
work_scope = models.CharField('作业范围', max_length=200, null=True, blank=True)
level = models.CharField('作业级别', max_length=20,
help_text='特技/三级/二级/主干道/次干道', default='')
help_text='特技/三级/二级/主干道/次干道', null=True, blank=True)
cate = models.ForeignKey(OplCate, verbose_name='作业许可种类',
on_delete=models.CASCADE)
start_time = models.DateTimeField('作业开始时间', null=True, blank=True)