models: make Journal.actor nullable

This commit is contained in:
Benjamin Dauvergne 2020-05-15 16:21:56 +02:00
parent e7f9e32fe0
commit ce3a088a24
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2020-05-15 14:16
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('authentic2_cut', '0004_auto_20180801_1147'),
]
operations = [
migrations.AlterField(
model_name='journal',
name='actor',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='actor_journal', to=settings.AUTH_USER_MODEL, verbose_name='Auteur'),
),
]

View File

@ -25,6 +25,7 @@ class Journal(models.Model):
auto_now_add=True)
actor = models.ForeignKey(
settings.AUTH_USER_MODEL,
null=True,
verbose_name=u'Auteur',
related_name='actor_journal',
on_delete=models.SET_NULL)