# HG changeset patch # User David Douard # Date 1380201539 -7200 # Node ID 564bdd4dbf8f588fa5ec5de5b1f2e344bcaf012b # Parent cbee712dd310d4ebb0b6914965f279d596d14086 fix typos in workflow constraint error messages diff -r cbee712dd310 -r 564bdd4dbf8f entities/test/unittest_wfobjs.py --- a/entities/test/unittest_wfobjs.py Tue Sep 17 17:44:15 2013 +0200 +++ b/entities/test/unittest_wfobjs.py Thu Sep 26 15:18:59 2013 +0200 @@ -75,7 +75,7 @@ wf.add_transition(u'baz', (bar,), foo) with self.assertRaises(ValidationError) as cm: self.commit() - self.assertEqual(cm.exception.errors, {'name-subject': 'workflow already have a transition of that name'}) + self.assertEqual(cm.exception.errors, {'name-subject': 'workflow already has a transition of that name'}) # no pb if not in the same workflow wf2 = add_wf(self, 'Company') foo = wf.add_state(u'foo', initial=True) @@ -88,7 +88,7 @@ biz.cw_set(name=u'baz') with self.assertRaises(ValidationError) as cm: self.commit() - self.assertEqual(cm.exception.errors, {'name-subject': 'workflow already have a transition of that name'}) + self.assertEqual(cm.exception.errors, {'name-subject': 'workflow already has a transition of that name'}) class WorkflowTC(CubicWebTC): diff -r cbee712dd310 -r 564bdd4dbf8f schemas/workflow.py --- a/schemas/workflow.py Tue Sep 17 17:44:15 2013 +0200 +++ b/schemas/workflow.py Thu Sep 26 15:18:59 2013 +0200 @@ -89,14 +89,14 @@ name = String(required=True, indexed=True, internationalizable=True, maxsize=256, constraints=[RQLUniqueConstraint('S name N, S transition_of WF, Y transition_of WF, Y name N', 'Y', - _('workflow already have a transition of that name'))]) + _('workflow already has a transition of that name'))]) type = String(vocabulary=(_('normal'), _('auto')), default='normal') description = RichString(description=_('semantic description of this transition')) transition_of = SubjectRelation('Workflow', cardinality='1*', composite='object', description=_('workflow to which this transition belongs'), constraints=[RQLUniqueConstraint('S name N, Y transition_of O, Y name N', 'Y', - _('workflow already have a transition of that name'))]) + _('workflow already has a transition of that name'))]) class require_group(RelationDefinition):