Skip to content

Commit

Permalink
refactor: quib model made fields required
Browse files Browse the repository at this point in the history
  • Loading branch information
moonlitgrace committed Dec 4, 2024
1 parent 322fd27 commit 4ca64f4
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Generated by Django 5.1.3 on 2024-12-04 16:17

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


class Migration(migrations.Migration):

dependencies = [
('quiblet', '0017_alter_quib_id_alter_quiblet_id'),
('user', '0001_initial'),
]

operations = [
migrations.AlterField(
model_name='quib',
name='quibber',
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name='quibs',
to='user.profile',
verbose_name='quibber',
),
),
migrations.AlterField(
model_name='quib',
name='quiblet',
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name='quibs',
to='quiblet.quiblet',
verbose_name='quiblet',
),
),
]
5 changes: 1 addition & 4 deletions backend/apps/quiblet/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,13 @@ class Quib(CreatedAtMixin, IsPublicMixin, ShortUUIDMixin):
Quiblet,
related_name='quibs',
verbose_name=_('quiblet'),
blank=True,
on_delete=models.CASCADE,
)
quibber = models.ForeignKey(
Profile,
related_name='quibs',
blank=True,
null=True,
verbose_name=_('quibber'),
on_delete=models.SET_NULL,
on_delete=models.CASCADE,
)
title = models.CharField(_('title'), max_length=255)
slug = models.SlugField(_('slug'), editable=False, max_length=25, blank=True)
Expand Down

0 comments on commit 4ca64f4

Please sign in to comment.