Skip to content

Commit

Permalink
renamed private_rebuttals -> private_posts
Browse files Browse the repository at this point in the history
  • Loading branch information
seporterfield committed May 29, 2024
1 parent 4140f49 commit cac6c2a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 5.0.4 on 2024-05-28 23:21
# Generated by Django 5.0.4 on 2024-05-29 19:14

import django.db.models.deletion
from django.conf import settings
Expand Down Expand Up @@ -85,9 +85,9 @@ class Migration(migrations.Migration):
models.ManyToManyField(related_name="posts", to="core.posts"),
),
(
"privateRebuttals",
"private_post",
models.ManyToManyField(
related_name="private_rebuttals", to="core.posts"
related_name="private_post", to="core.posts"
),
),
(
Expand Down
9 changes: 5 additions & 4 deletions backend/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ class Posts(models.Model):

class UserProfile(models.Model):
# Public
user = None # type: ignore
user = models.OneToOneField(User, on_delete=models.CASCADE, null=True)
user: models.OneToOneField = models.OneToOneField(
User, on_delete=models.CASCADE, null=True
)
username: models.CharField = models.CharField(
max_length=USERNAME_MAX_LEN, null=True
)
Expand All @@ -67,6 +68,6 @@ class UserProfile(models.Model):
savedPosts: models.ManyToManyField = models.ManyToManyField(
Posts, related_name="saved_posts"
)
privateRebuttals: models.ManyToManyField = models.ManyToManyField(
Posts, related_name="private_rebuttals"
private_post: models.ManyToManyField = models.ManyToManyField(
Posts, related_name="private_post"
)

0 comments on commit cac6c2a

Please sign in to comment.