Fixed number is NULL constraint.

This commit is contained in:
2018-01-24 18:34:29 +01:00
parent d8d9fcef12
commit d3898430cf
2 changed files with 23 additions and 1 deletions

View File

@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.9 on 2018-01-24 17:25
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dav_events', '0004_auto_20180124_1650'),
]
operations = [
migrations.AlterField(
model_name='event',
name='number',
field=models.CharField(blank=True, default=None, max_length=12, null=True, unique=True),
),
]

View File

@@ -43,7 +43,9 @@ class Event(models.Model):
related_name='+') related_name='+')
number = models.CharField(unique=True, number = models.CharField(unique=True,
max_length=config.NUMBER_MAX_LENGTH, max_length=config.NUMBER_MAX_LENGTH,
blank=True) blank=True,
null=True,
default=None)
# DescriptionForm # DescriptionForm
title = models.CharField(max_length=config.TITLE_MAX_LENGTH) title = models.CharField(max_length=config.TITLE_MAX_LENGTH)