Revision eee9ec4d snf-astakos-app/astakos/im/forms.py

b/snf-astakos-app/astakos/im/forms.py
895 895
        policies = sorted(policies, key=resource_order)
896 896
        return policies
897 897

  
898
    def cleaned_resource_policies(self):
899
        return [(d['name'], d['uplimit']) for d in self.resource_policies]
900

  
898 901
    def save(self, commit=True):
899 902
        data = dict(self.cleaned_data)
900 903
        data['precursor_application'] = self.instance.id
901 904
        is_new = self.instance.id is None
902 905
        data['owner'] = self.user if is_new else self.instance.owner
903
        data['resource_policies'] = self.resource_policies
906
        data['resource_policies'] = self.cleaned_resource_policies()
904 907
        submit_application(data, request_user=self.user)
905 908

  
906 909
class ProjectSortForm(forms.Form):

Also available in: Unified diff