Revision 40b52116

b/snf-astakos-app/astakos/im/forms.py
926 926
            'resource_grants', 'id', 'applicant', 'owner',
927 927
            'precursor_application', 'state', 'issue_date')
928 928

  
929
    def __init__(self, *args, **kwargs):
930
        self.precursor_application = kwargs.get('instance')
931
        super(ProjectApplicationForm, self).__init__(*args, **kwargs)
932
    
929 933
    def clean(self):
930 934
        userid = self.data.get('user', None)
931 935
        self.user = None
......
965 969
        application = super(ProjectApplicationForm, self).save(commit=False)
966 970
        applicant = self.user
967 971
        comments = self.cleaned_data.pop('comments', None)
968
        precursor_application = self.instance
969 972
        return submit_application(
970 973
            application,
971 974
            self.resource_policies,
972 975
            applicant,
973 976
            comments,
974
            precursor_application
977
            self.precursor_application
975 978
        )
976 979

  
977 980
class ProjectSortForm(forms.Form):

Also available in: Unified diff