Allow no artists to be attached at song creation in API.

This commit is contained in:
Josh Washburne 2018-04-02 16:51:24 -04:00
parent 76493de8c8
commit f24d1dacbc
2 changed files with 2 additions and 2 deletions

View file

@ -83,7 +83,7 @@ class Migration(migrations.Migration):
('path', models.TextField(verbose_name='absolute path to song file')),
('sorted_title', models.CharField(db_index=True, editable=False, max_length=255, verbose_name='naturalized title')),
('album', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='radio.Album')),
('artists', models.ManyToManyField(to='radio.Artist')),
('artists', models.ManyToManyField(blank=True, to='radio.Artist')),
('game', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='radio.Game')),
],
options={

View file

@ -102,7 +102,7 @@ class Song(Disableable, Publishable, Timestampable, models.Model):
on_delete=models.SET_NULL,
null=True,
blank=True)
artists = models.ManyToManyField(Artist)
artists = models.ManyToManyField(Artist, blank=True)
game = models.ForeignKey(Game,
on_delete=models.SET_NULL,
null=True,