Skip to content

Commit

Permalink
add blank for optional sender_user
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienReuiller committed Aug 31, 2023
1 parent 493a459 commit cbe68eb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# Generated by Django 4.2.2 on 2023-08-30 12:36

import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("conversations", "0007_conversation_sender_first_name_and_more"),
Expand All @@ -18,6 +17,7 @@ class Migration(migrations.Migration):
name="sender_user",
field=models.ForeignKey(
null=True,
blank=True,
on_delete=django.db.models.deletion.CASCADE,
to=settings.AUTH_USER_MODEL,
verbose_name="Utilisateur à l'initiative",
Expand Down
6 changes: 5 additions & 1 deletion lemarche/conversations/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ class Conversation(models.Model):
verbose_name="Type de conversation", default=KIND_SEARCH, choices=KIND_CHOICES, max_length=10, db_index=True
)
sender_user = models.ForeignKey(
settings.AUTH_USER_MODEL, verbose_name="Utilisateur à l'initiative", on_delete=models.CASCADE, null=True
settings.AUTH_USER_MODEL,
verbose_name="Utilisateur à l'initiative",
on_delete=models.CASCADE,
null=True,
blank=True,
)
sender_email = models.EmailField(verbose_name="Email de l'initiateur de la conversation", null=True)
sender_first_name = models.CharField(verbose_name="Prénom", max_length=150)
Expand Down

0 comments on commit cbe68eb

Please sign in to comment.