Fixed a cleaning bug which allowed a proposal to be recreated by the original proposer.
Patch by: Lennard de Rijk
Reviewed by: to-be-reviewed
--- 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]