X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=qcg%2Fforms.py;h=ea0804683037478d88816c882abb74f6f5e5436f;hb=1547dbc536b4848a93ce0a39493c0c69b853c576;hp=3a5b63767fc274164f2989ee5e1744cd1cf90717;hpb=1b76c73420af7e025fb758862a9dc297ffc64981;p=qcg-portal.git diff --git a/qcg/forms.py b/qcg/forms.py index 3a5b637..ea08046 100644 --- a/qcg/forms.py +++ b/qcg/forms.py @@ -195,21 +195,10 @@ class JobDescriptionForm(forms.Form): data['postprocess'] = '' def clean_application(self): - value = self.cleaned_data['application'] - - if '/' in value: - return value.split('/', 1) - - return value, None + return self.cleaned_data['application'].split('/', 1) def clean_nodes(self): - value = map(int, self.cleaned_data['nodes'].split(':', 2)) - - if len(value) == 3: - return tuple(value) - - nodes, slots = value - return nodes, slots, slots + return map(int, self.cleaned_data['nodes'].split(':', 2)) class EnvForm(forms.Form):