Opened 9 years ago

Closed 9 years ago

#5091 closed (worksforme)

misleading example in groups documentation

Reported by: anonymous Owned by: Jacob
Component: Documentation Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

There's something to the effect of
user.groups = [group list]
and
user.permissions = [permission list]

which would of course give an error, since those are managers. You need a .all() to get an iterable.

Change History (1)

comment:1 Changed 9 years ago by Chris Beaven

Resolution: worksforme
Status: newclosed

It's not misleading, it should work like that. See django.db.models.manager::ForeignRelatedObjectsDescriptor.__set__

Note: See TracTickets for help on using tickets.
Back to Top