Ticket #24756: models.patch
| File models.patch, 542 bytes (added by , 11 years ago) |
|---|
| Line | |
|---|---|
| 1 | @@ -414,7 +414,7 @@ def _post_clean(self): |
| 2 | # a subset of `exclude` which won't have the InlineForeignKeyField |
| 3 | # if we're adding a new object since that value doesn't exist |
| 4 | # until after the new instance is saved to the database. |
| 5 | - construct_instance_exclude = list(exclude) |
| 6 | + construct_instance_exclude = list(opts.exclude) if opts.exclude else [] |
| 7 | |
| 8 | # Foreign Keys being used to represent inline relationships |
| 9 | # are excluded from basic field value validation. This is for two |