197 # validate the link_id |
197 # validate the link_id |
198 club_link_id = clean_link_id(field_name)(self) |
198 club_link_id = clean_link_id(field_name)(self) |
199 |
199 |
200 # check if there is already an application with the given link_id |
200 # check if there is already an application with the given link_id |
201 fields = {'link_id': club_link_id, |
201 fields = {'link_id': club_link_id, |
202 'state': ['accepted','ignored','needs review','completed']} |
202 'status': ['accepted','ignored','needs review','completed']} |
203 club_app_entity = club_app_logic.logic.getForFields(fields, unique=True) |
203 club_app_entity = club_app_logic.logic.getForFields(fields, unique=True) |
204 |
204 |
205 if club_app_entity: |
205 if club_app_entity: |
206 raise forms.ValidationError( |
206 raise forms.ValidationError( |
207 ugettext('This link ID is already in use, please specify another one')) |
207 ugettext('This link ID is already in use, please specify another one')) |
208 |
208 |
209 # check if there is already a club with the given link_id |
209 # check if there is already a club with the given link_id |
210 fields['state'] = ['new', 'active', 'inactive'] |
210 fields['status'] = ['new', 'active', 'inactive'] |
211 club_entity = club_logic.logic.getForFields(fields, unique=True) |
211 club_entity = club_logic.logic.getForFields(fields, unique=True) |
212 |
212 |
213 if club_entity: |
213 if club_entity: |
214 raise forms.ValidationError( |
214 raise forms.ValidationError( |
215 ugettext('This link ID is already in use, please specify another one')) |
215 ugettext('This link ID is already in use, please specify another one')) |