Skip to content

Commit

Permalink
Removed deprecated QuestionResponse model and duplicate line (#625)
Browse files Browse the repository at this point in the history
* Remove deprecated QuestionResponse model

* remove duplicate line: 'rank field in Club'

* made migrations after deleting QuestionResponse
  • Loading branch information
Porcupine1 authored Mar 9, 2024
1 parent 8eb3478 commit 79c3f79
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
16 changes: 16 additions & 0 deletions backend/clubs/migrations/0096_delete_questionresponse.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Generated by Django 5.0.2 on 2024-03-06 01:23

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
("clubs", "0095_rm_field_add_count"),
]

operations = [
migrations.DeleteModel(
name="QuestionResponse",
),
]
12 changes: 0 additions & 12 deletions backend/clubs/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,6 @@ class Club(models.Model):
# cache club rankings
rank = models.IntegerField(default=0)

# cache club rankings
rank = models.IntegerField(default=0)

created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)

Expand Down Expand Up @@ -1776,15 +1773,6 @@ class Meta:
unique_together = (("question", "submission"),)


class QuestionResponse(models.Model):
"""
Represents a response to a question on a custom application
"""

question = models.ForeignKey(ApplicationQuestion, on_delete=models.CASCADE)
response = models.TextField(blank=True)


@receiver(models.signals.pre_delete, sender=Asset)
def asset_delete_cleanup(sender, instance, **kwargs):
if instance.file:
Expand Down

0 comments on commit 79c3f79

Please sign in to comment.