Index: main/waeup.fceokene/trunk/src/waeup/fceokene/applicants/browser.py
===================================================================
--- main/waeup.fceokene/trunk/src/waeup/fceokene/applicants/browser.py	(revision 16844)
+++ main/waeup.fceokene/trunk/src/waeup/fceokene/applicants/browser.py	(revision 16848)
@@ -191,8 +191,12 @@
         counter = 0
         for appl in container.values():
-            if appl.state in (SUBMITTED, ADMITTED, NOT_ADMITTED, CREATED) \
-                and (appl.school1 == self.context.school1 \
-                     or appl.school1 == data.get('school1')):
-                counter += 1
+            if appl.state in (SUBMITTED, ADMITTED, NOT_ADMITTED, CREATED):
+                if appl.school1 == self.context.school1 \
+                    or appl.school1 == data.get('school1'):
+                    counter += 1
+                    if appl != self.context \
+                        and (appl.subj_comb == self.context.subj_comb \
+                            or appl.subj_comb == data.get('subj_comb')):
+                        return True
                 if counter == 10:
                     return True
Index: main/waeup.fceokene/trunk/src/waeup/fceokene/applicants/interfaces.py
===================================================================
--- main/waeup.fceokene/trunk/src/waeup/fceokene/applicants/interfaces.py	(revision 16844)
+++ main/waeup.fceokene/trunk/src/waeup/fceokene/applicants/interfaces.py	(revision 16848)
@@ -158,5 +158,5 @@
         title = _(u'Subject Combination'),
         source = AppCatCertificateSource(),
-        required = False,
+        required = True,
         )
 
Index: main/waeup.fceokene/trunk/src/waeup/fceokene/applicants/tests/test_browser.py
===================================================================
--- main/waeup.fceokene/trunk/src/waeup/fceokene/applicants/tests/test_browser.py	(revision 16844)
+++ main/waeup.fceokene/trunk/src/waeup/fceokene/applicants/tests/test_browser.py	(revision 16848)
@@ -21,4 +21,6 @@
 import pytz
 import os
+import grok
+from zope.event import notify
 from zope.component.hooks import setSite, clearSite
 from zope.component import createObject
@@ -94,5 +96,5 @@
         self.tpucontainer.code = u'tpu%s' % session
         self.tpucontainer.prefix = u'tpu'
-        self.tpucontainer.application_category = u'no'
+        self.tpucontainer.application_category = u'tpu'
         self.tpucontainer.year = session
         self.tpucontainer.application_fee = 300.0
@@ -190,4 +192,6 @@
         
     def test_final_submit_tpu(self):
+        self.certificate.application_category = 'tpu'
+        notify(grok.ObjectModifiedEvent(self.certificate))
         IWorkflowState(self.tpuapplicant).setState('paid')
         self.browser.open(self.login_path)
@@ -199,4 +203,5 @@
         self.browser.getControl(name="form.email").value = 'xx@yy.zz'
         self.browser.getControl(name="form.school1").value = ['s0010']
+        self.browser.getControl(name="form.subj_comb").value = ['CERT1']
         image = open(SAMPLE_IMAGE, 'rb')
         ctrl = self.browser.getControl(name='form.passport')
@@ -226,4 +231,27 @@
             in self.browser.contents)
         self.assertEqual(self.tpuapplicant.state, 'paid')
+        # Create one applicant with same subject and same school
+        dummy = createObject(u'waeup.Applicant')
+        dummy.firstname = u'John'
+        dummy.lastname = u'Doe %s' %i
+        dummy.school1 = 's0012'
+        dummy.subj_comb = self.certificate
+        self.app['applicants'][
+            self.tpucontainer.code].addApplicant(dummy)
+        IWorkflowState(dummy).setState('submitted')
+        self.browser.open(self.tpuapplicant_path + '/edit')
+        self.browser.getControl(name="form.school1").value = ['s0012']
+        self.browser.getControl(name="form.subj_comb").value = ['CERT1']
+        self.browser.getControl("Finally Submit").click()
+        self.assertTrue("Maximum number of applications per school exceeded."
+            in self.browser.contents)
+        self.assertEqual(self.tpuapplicant.state, 'paid')
+        self.browser.open(self.tpuapplicant_path + '/edit')
+        self.browser.getControl(name="form.school1").value = ['s0013']
+        self.browser.getControl(name="form.subj_comb").value = ['CERT1']
+        self.browser.getControl("Finally Submit").click()
+        self.assertTrue(
+            'Application submitted' in self.browser.contents)
+        self.assertEqual(self.tpuapplicant.state, 'submitted')
         return
 
