79509389

Date: 2025-03-14 14:47:15
Score: 0.5
Natty:
Report link

I think that many to many attribute/entity is expecting a Foreign Key to Project model, and that's what generating your error. Perhaps you may need to rethink your models a little. For example, a project will always have an owner and contributors, so you may add these attributes to Project model instead of Account, and that many to many field would be added in Project as well (a project has single owner and many contributors).

Then, if you want to get all project a single user is participating you could use "get_related" methods to pull that QuerySet.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Héctor Asencio L