diff --git a/src/nefarious/migrations/0095_auto_20240816_1302.py b/src/nefarious/migrations/0095_auto_20240816_1302.py new file mode 100644 index 00000000..ad3fcc02 --- /dev/null +++ b/src/nefarious/migrations/0095_auto_20240816_1302.py @@ -0,0 +1,24 @@ +# Generated by Django 3.0.2 on 2024-08-16 13:02 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('nefarious', '0094_auto_20240816_1251'), + ] + + operations = [ + migrations.AlterField( + model_name='nefarioussettings', + name='quality_profile_movies', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='quality_profile_movies_default', to='nefarious.QualityProfile'), + ), + migrations.AlterField( + model_name='nefarioussettings', + name='quality_profile_tv', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='quality_profile_tv_default', to='nefarious.QualityProfile'), + ), + ] diff --git a/src/nefarious/models.py b/src/nefarious/models.py index cefa4918..56518c2a 100644 --- a/src/nefarious/models.py +++ b/src/nefarious/models.py @@ -74,9 +74,8 @@ class NefariousSettings(models.Model): open_subtitles_user_token = models.CharField(max_length=500, blank=True, null=True, help_text='OpenSubtitles user auth token') # generated in auth flow open_subtitles_auto = models.BooleanField(default=False, help_text='Whether to automatically download subtitles') - # TODO - don't allow NULL - quality_profile_tv = models.ForeignKey(QualityProfile, on_delete=models.PROTECT, null=True, related_name='quality_profile_tv_default') - quality_profile_movies = models.ForeignKey(QualityProfile, on_delete=models.PROTECT, null=True, related_name='quality_profile_movies_default') + quality_profile_tv = models.ForeignKey(QualityProfile, on_delete=models.PROTECT, related_name='quality_profile_tv_default') + quality_profile_movies = models.ForeignKey(QualityProfile, on_delete=models.PROTECT, related_name='quality_profile_movies_default') # TODO - move to quality profile # whether to allow hardcoded subtitles