Commit 66048a5
committed
chore: drop related name on base model
This caused, for example, on the `User` model to set an `acl`
attribute, pointing to the creator.
This is very confusing, for example if searching for all users within a scope:
>>> User.objects.filter(acl__scope__in=scope_list)
This would return the user who has *created* all those ACLs, instead of the
users who are in fact *granted* the ACL.
The correct way would have been
>>> User.objects.filter(acls__scope__in=scope_list)
So to avoid this confusion (and others), we'll remove the related name.created_by_user
1 parent 7ee7f3e commit 66048a5
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| |||
0 commit comments