collective / collective.nitf

A Dexterity-based content type inspired on the News Industry Text Format specification
8 stars 3 forks source link

ConstraintNotSatisfied when adding an article #70

Closed hvelarde closed 9 years ago

hvelarde commented 11 years ago

this happens in 1.0b2 release: when you try to add an article and your site is not in the language specified:

Traceback (innermost last):
  Module ZPublisher.Publish, line 60, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 46, in call_object
  Module plone.z3cform.layout, line 66, in __call__
  Module plone.z3cform.layout, line 50, in update
  Module collective.nitf.browser, line 36, in update
  Module plone.dexterity.browser.add, line 112, in update
  Module plone.z3cform.fieldsets.extensible, line 59, in update
  Module plone.z3cform.patch, line 30, in GroupForm_update
  Module z3c.form.group, line 137, in update
  Module z3c.form.group, line 49, in update
  Module z3c.form.group, line 45, in updateWidgets
  Module z3c.form.field, line 277, in update
  Module z3c.form.browser.select, line 51, in update
  Module z3c.form.browser.widget, line 171, in update
  Module z3c.form.widget, line 221, in update
  Module z3c.form.widget, line 114, in update
  Module zope.schema._bootstrapfields, line 78, in __get__
  Module zope.schema._bootstrapfields, line 182, in validate
  Module zope.schema._field, line 389, in _validate
ConstraintNotSatisfied: pt-br

see: https://github.com/collective/collective.nitf/blob/1.0b2/src/collective/nitf/browser.py#L36