#2307: TG2 admin pages fail validation if 1:M backref relationships are empty
------------------------+---------------------------------------------------
 Reporter:  mwtb        |       Owner:        
     Type:  defect      |      Status:  new   
 Priority:  normal      |   Milestone:  2.0rc2
Component:  TurboGears  |     Version:  2.0rc1
 Severity:  normal      |    Keywords:        
------------------------+---------------------------------------------------
 Using the models below, on trying to create a Product with no
 ProductVersions existing, the form fails validation with "Missing Value"
 against the Versions entry.

 class Product(DeclarativeBase):
     __tablename__ = 'products'

     #{ Columns

     id = Column(Integer, primary_key=True)
     name = Column(Unicode(128), nullable=False)
     description = Column(Unicode(1024), nullable=False)
     created = Column(DateTime, default=datetime.now)

     #}


 class ProductVersion(DeclarativeBase):
     __tablename__ = 'product_versions'

     #{ Columns

     id = Column(Integer, primary_key=True)
     version_label = Column(Unicode(128), nullable=False)
     resource_location = Column(Unicode(1024), nullable=False)
     created = Column(DateTime, default=datetime.now)

     product_id = Column(Integer, ForeignKey('products.id'))

     product = relation(Product, backref=backref('versions', order_by=id))

-- 
Ticket URL: <http://trac.turbogears.org/ticket/2307>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to