#2307: TG2 admin pages fail validation if 1:M backref relationships are empty
----------------------+-----------------------------------------------------
 Reporter:  mwtb      |        Owner:  percious
     Type:  defect    |       Status:  new     
 Priority:  normal    |    Milestone:  2.1a1   
Component:  Catwalk2  |      Version:  2.0rc1  
 Severity:  normal    |   Resolution:          
 Keywords:            |  
----------------------+-----------------------------------------------------
Changes (by jorge.vargas):

  * owner:  => percious
  * component:  TurboGears => Catwalk2

Old description:

> 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))

New description:

 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#comment:1>
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