删除 ManyToMany 字段无效的 null=True

This commit is contained in:
virusdefender
2015-08-12 22:59:05 +08:00
parent ba57341dbd
commit f6c3ceee40
2 changed files with 20 additions and 1 deletions

View File

@@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('problem', '0003_auto_20150810_2233'),
]
operations = [
migrations.AlterField(
model_name='problem',
name='tags',
field=models.ManyToManyField(to='problem.ProblemTag'),
),
]

View File

@@ -49,4 +49,4 @@ class Problem(AbstractProblem):
# 难度 0 - n
difficulty = models.IntegerField()
# 标签
tags = models.ManyToManyField(ProblemTag, null=True)
tags = models.ManyToManyField(ProblemTag)