Opened 15 years ago
Closed 15 years ago
#12917 closed (invalid)
Buggy save_new() of BaseInlineFormSet when getting pk_value of related object
Reported by: | anonymous | Owned by: | nobody |
---|---|---|---|
Component: | Uncategorized | Version: | 1.1 |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
pk_value = getattr(self.instance, self.fk.rel.field_name)
The attribute actually belongs to the related object, not the object relating to, so this statement is sure to fail. I was wondering if anyone can come up with a solution to fix this.
Note:
See TracTickets
for help on using tickets.
The usage reads ok to me, and I'm fairly certain this line is tested. In the absence of a specific test case that is failing, I'm marking this report invalid.