Skip to content

Conversation

@shristi-13
Copy link
Contributor

changes in video model fields

@digitalgreenorg digitalgreenorg deleted a comment Sep 13, 2018
@digitalgreenorg digitalgreenorg deleted a comment Sep 13, 2018
migrations.AlterField(
model_name='video',
name='category',
field=models.ForeignKey(default=-1, to='videos.Category'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this thing will work, since this will give the category_id default value of -1, the foreign key constraint might break since the Category table does not have any id = -1.

village = models.ForeignKey(Village)
production_team = models.ManyToManyField(Animator)
category = models.ForeignKey(Category, null=True, blank=True)
category = models.ForeignKey(Category)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refer to above comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants