Make content_category non-nullable
This commit is contained in:
parent
d90e850265
commit
a2cb4cbdc8
|
@ -132,7 +132,6 @@ SPECTACULAR_SETTINGS = {
|
||||||
"OAUTH2_AUTHORIZATION_URL": "/authorize",
|
"OAUTH2_AUTHORIZATION_URL": "/authorize",
|
||||||
"OAUTH2_TOKEN_URL": "/api/v1/oauth/token/",
|
"OAUTH2_TOKEN_URL": "/api/v1/oauth/token/",
|
||||||
"PREPROCESSING_HOOKS": ["config.schema.custom_preprocessing_hook"],
|
"PREPROCESSING_HOOKS": ["config.schema.custom_preprocessing_hook"],
|
||||||
'ENUM_ADD_EXPLICIT_BLANK_NULL_CHOICE': False,
|
|
||||||
"ENUM_NAME_OVERRIDES": {
|
"ENUM_NAME_OVERRIDES": {
|
||||||
"FederationChoiceEnum": "funkwhale_api.federation.models.TYPE_CHOICES",
|
"FederationChoiceEnum": "funkwhale_api.federation.models.TYPE_CHOICES",
|
||||||
"ReportTypeEnum": "funkwhale_api.moderation.models.REPORT_TYPES",
|
"ReportTypeEnum": "funkwhale_api.moderation.models.REPORT_TYPES",
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
# Generated by Django 3.2.14 on 2022-07-19 13:28
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('music', '0055_auto_20220627_1915'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='artist',
|
||||||
|
name='content_category',
|
||||||
|
field=models.CharField(choices=[('music', 'music'), ('podcast', 'podcast'), ('other', 'other')], db_index=True, default='music', max_length=30),
|
||||||
|
),
|
||||||
|
]
|
|
@ -251,7 +251,7 @@ class Artist(APIModelMixin):
|
||||||
db_index=True,
|
db_index=True,
|
||||||
default="music",
|
default="music",
|
||||||
choices=ARTIST_CONTENT_CATEGORY_CHOICES,
|
choices=ARTIST_CONTENT_CATEGORY_CHOICES,
|
||||||
null=True,
|
null=False,
|
||||||
)
|
)
|
||||||
modification_date = models.DateTimeField(default=timezone.now, db_index=True)
|
modification_date = models.DateTimeField(default=timezone.now, db_index=True)
|
||||||
api = musicbrainz.api.artists
|
api = musicbrainz.api.artists
|
||||||
|
|
Loading…
Reference in New Issue