#5954 closed (duplicate)
inline extra fields are required
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.admin | Version: | newforms-admin |
Severity: | Keywords: | edit inline extra required | |
Cc: | alx.gsv@… | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
models.py
class Student(models.Model): ... class GosExamMark(models.Model): student = models.ForeignKey('Student') ... class GosExamMarkTabular(admin.TabularInline): model = GosExamMark extra = 1 class StudentOptions(admin.ModelAdmin): model = Student inlines = [GosExamMarkTabular, ...] diplomCorectorSite = admin.AdminSite() diplomCorectorSite.register(Student, StudentOptions)
When i'm editing one of Student odjects trough admin site i got error in extra
object form that tells me fields are required.
But i dont want to add new inline object - i just want to edit Student object.
Change History (3)
comment:1 by , 17 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
comment:2 by , 17 years ago
comment:3 by , 17 years ago
Thank you sjulean for your help! :)
My svn tells me my newforms-admin is up-to-date. But problem exists. Does it mean that this patch not applied to the brach?
Note:
See TracTickets
for help on using tickets.
You really didn't provide enough information on why they are being required. However, if you have specified a default value for a field that is being edited inline then it will fail. This is fundamentally because of #5878. I am going to mark this as a duplicate. The last merge with trunk brought over #899 which is now causing this behavior. If you can provide some more information that does not have anything to do with a model field's default value, please by all means reopen.