Skip to content

How to fill many to many relations? #117

@sergeypoprovka

Description

@sergeypoprovka

Hey!

Inside the User model I have Skills relation which is many-to-many filed. It can't be null. So when I'm trying to use Django-seed w/o extra params - it's giving me the error that "The field can't be null". Which is logical.
But when I'm trying to pass list of Skill objects there - it's giving me

**TypeError: Direct assignment to the forward side of a many-to-many set is prohibited.**

So the question is - if it's possible at all to seed many-to-many model? And if yes - how to do that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions