diff --git a/pretalx_musicrate/migrations/0007_remove_juror_created_remove_juror_updated.py b/pretalx_musicrate/migrations/0007_remove_juror_created_remove_juror_updated.py new file mode 100644 index 0000000..73a483e --- /dev/null +++ b/pretalx_musicrate/migrations/0007_remove_juror_created_remove_juror_updated.py @@ -0,0 +1,20 @@ +# Generated by Django 4.2.8 on 2023-12-16 20:20 + +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("pretalx_musicrate", "0006_musicratesettings_link_questions"), + ] + + operations = [ + migrations.RemoveField( + model_name="juror", + name="created", + ), + migrations.RemoveField( + model_name="juror", + name="updated", + ), + ] diff --git a/pretalx_musicrate/models.py b/pretalx_musicrate/models.py index ae52238..6347971 100644 --- a/pretalx_musicrate/models.py +++ b/pretalx_musicrate/models.py @@ -3,7 +3,7 @@ from secrets import token_urlsafe from django.db import models from django.utils.translation import gettext_lazy as _ -from pretalx.common.mixins.models import PretalxModel +from django_scopes import ScopedManager def generate_token(): @@ -65,7 +65,9 @@ class MusicrateSettings(models.Model): ) -class Juror(PretalxModel): +class Juror(models.Model): + objects = ScopedManager(event="event") + event = models.ForeignKey( "event.Event", on_delete=models.CASCADE, related_name="jurors" )