Revision 2ef98527 snf-astakos-app/astakos/im/forms.py

b/snf-astakos-app/astakos/im/forms.py
763 763
                    'limit_on_members_number')
764 764

  
765 765
    def __init__(self, *args, **kwargs):
766
        self.precursor_application = kwargs.get('instance')
766
        instance = kwargs.get('instance')
767
        self.precursor_application = instance
767 768
        super(ProjectApplicationForm, self).__init__(*args, **kwargs)
769
        if not instance:
770
            # remove closed join policy
771
            policies = PROJECT_MEMBER_JOIN_POLICIES.copy()
772
            policies.pop('3')
773
            self.fields['member_join_policy'].choices = policies.iteritems()
768 774

  
769 775
    def clean_start_date(self):
770 776
        start_date = self.cleaned_data.get('start_date')

Also available in: Unified diff