Django

Code

Ticket #575 (reopened)

Opened 3 years ago

Last modified 5 months ago

edit_inline don't save child data when a "blank=True" field is not set

Reported by: pylorca Assigned to: nobody
Component: Admin interface Version: SVN
Keywords: nfa-fixed Cc:
Triage Stage: Accepted Has patch: 0
Needs documentation: 0 Needs tests: 0
Patch needs improvement: 0

Description

when I try to insert or modify throught the admin interface, child data is not saved when there is a "blank=True" field and it's not set.

example:

model:

class Person(meta.Model):
    name = meta.CharField(maxlength=30)
    lastName = meta.CharField(maxlength=30)

class Phone:
    person = meta.ForeignKey(Person, edit_inline=meta.STACKED, num_in_admin=2)
    number = meta.CharField(maxlength=30, core=True)
    description = meta.CharField(maxlength=100, blank=True, core=True)

if I set a Phone number and I don't set description, this don't throw any error, but the Phone data is not saved, but this would be saved if I set the description too

Attachments

Change History

07/08/07 23:09:15 changed by Gary Wilson <gary.wilson@gmail.com>

  • stage changed from Ready for checkin to Accepted.

Maybe the blank=True in not playing nice with core=True. The edit_inline stuff will be changing in the newforms-admin branch.

Anyhow, this is not ready for checkin.

09/30/07 10:15:12 changed by clarice

  • cc set to ashleigh.
  • keywords set to ashleigh.
  • version set to 0.91.
  • component changed from Admin interface to django.newforms.
  • stage changed from Accepted to Ready for checkin.

09/30/07 10:16:36 changed by alishia

  • version changed from 0.91 to other branch.
  • component changed from django.newforms to Documentation.
  • stage changed from Ready for checkin to Accepted.

(follow-up: ↓ 5 ) 09/30/07 17:00:19 changed by gwilson

  • cc deleted.
  • keywords deleted.
  • version changed from other branch to SVN.
  • component changed from Documentation to Admin interface.

reverted spam

(in reply to: ↑ 4 ) 10/16/07 03:36:19 changed by anonymous

  • status changed from new to closed.
  • resolution set to wontfix.
  • component changed from Admin interface to Database wrapper.
  • stage changed from Accepted to Design decision needed.

Replying to gwilson:

reverted spam

10/16/07 11:50:49 changed by ubernostrum

  • component changed from Database wrapper to Admin interface.
  • stage changed from Design decision needed to Accepted.

10/26/07 03:57:32 changed by SmileyChris

  • status changed from closed to reopened.
  • resolution deleted.

Reverting close by anonymous

12/09/07 02:34:19 changed by brosner

  • keywords set to nfa-fixed.

This is no longer a problem with newforms-admin. core=True usage is completely gone. Tagging with nfa-fixed to be closed when newforms-admin is merged.


Add/Change #575 (edit_inline don't save child data when a "blank=True" field is not set)




Change Properties
Action