Revision f12bcb3d snf-astakos-app/astakos/im/forms.py
b/snf-astakos-app/astakos/im/forms.py | ||
---|---|---|
44 | 44 |
from django.utils.encoding import smart_str |
45 | 45 |
from django.db import transaction |
46 | 46 |
from django.core import validators |
47 |
from django.core.exceptions import PermissionDenied |
|
48 | 47 |
|
49 | 48 |
from synnefo_branding.utils import render_to_string |
50 | 49 |
from synnefo.lib import join_urls |
... | ... | |
53 | 52 |
from astakos.im import presentation |
54 | 53 |
from astakos.im.widgets import DummyWidget, RecaptchaWidget |
55 | 54 |
from astakos.im.functions import send_change_email, submit_application, \ |
56 |
accept_membership_project_checks |
|
55 |
accept_membership_project_checks, ProjectError
|
|
57 | 56 |
|
58 | 57 |
from astakos.im.util import reserved_verified_email, model_to_dict |
59 | 58 |
from astakos.im import auth_providers |
... | ... | |
969 | 968 |
def clean(self): |
970 | 969 |
try: |
971 | 970 |
accept_membership_project_checks(self.project, self.request_user) |
972 |
except PermissionDenied, e:
|
|
971 |
except ProjectError as e:
|
|
973 | 972 |
raise forms.ValidationError(e) |
974 | 973 |
|
975 | 974 |
q = self.cleaned_data.get('q') or '' |
Also available in: Unified diff