Skip to content

Commit

Permalink
remove "allow null" from NefariousSettings quality profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
lardbit committed Aug 16, 2024
1 parent 9e75ba3 commit 9f4beb4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
24 changes: 24 additions & 0 deletions src/nefarious/migrations/0095_auto_20240816_1302.py
Original file line number Diff line number Diff line change
@@ -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'),
),
]
5 changes: 2 additions & 3 deletions src/nefarious/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9f4beb4

Please sign in to comment.