Use getFromKeyFieldsOr404 in slots() and allocateSlots()
Handling of the exception is done by the view decorator.
Patch by: Sverre Rabbelier
--- a/app/soc/views/models/program.py Mon Mar 09 00:00:13 2009 +0000
+++ b/app/soc/views/models/program.py Mon Mar 09 00:00:41 2009 +0000
@@ -25,8 +25,8 @@
import os
+from django import forms
from django import http
-from django import forms
from django.utils import simplejson
from django.utils.translation import ugettext
@@ -169,7 +169,7 @@
params: a dict with params for this View, not used
"""
- program = program_logic.logic.getFromKeyFields(kwargs)
+ program = program_logic.logic.getFromKeyFieldsOr404(kwargs)
slots = program.slots
filter = {
@@ -243,7 +243,7 @@
org_params['list_row'] = 'soc/program/allocation/row.html'
org_params['list_pagination'] = 'soc/list/no_pagination.html'
- program = program_logic.logic.getFromKeyFields(kwargs)
+ program = program_logic.logic.getFromKeyFieldsOr404(kwargs)
filter = {
'scope': program,