app/soc/logic/cleaning.py
changeset 1755 972c546f0810
parent 1722 7f285e96cb17
child 1768 3177f83c1e50
--- a/app/soc/logic/cleaning.py	Sun Mar 08 18:09:04 2009 +0000
+++ b/app/soc/logic/cleaning.py	Sun Mar 08 19:12:17 2009 +0000
@@ -463,9 +463,10 @@
       # get the current user
       user_entity = user_logic.getForCurrentAccount()
 
-      # make sure it's not the applicant creating the new group
-      if group_app_entity and (
-          group_app_entity.applicant.key() != user_entity.key()):
+      # if the proposal has not been accepted or it's not the applicant
+      # creating the new group then show link ID in use message
+      if group_app_entity and (group_app_entity.status != 'accepted' or (
+          group_app_entity.applicant.key() != user_entity.key())):
         # add the error message to the link id field
         self._errors[link_id_field] = ErrorList([DEF_LINK_ID_IN_USE_MSG])
         del cleaned_data[link_id_field]