Previous change introduced a bug where Django's ORM would insert instead of update. Momentary revert.

This commit is contained in:
Piotr Mitros
2012-01-24 13:58:02 -05:00
parent 94a5c75088
commit 7971a02832

View File

@@ -106,12 +106,18 @@ def render_x_module(user, request, xml_module, module_object_preload):
module_id=xml_module.get('id') #module_class.id_attribute) or ""
# Grab state from database
s = object_cache(module_object_preload,
user,
module_type,
module_id)#student=request.user,
#module_id=module_id,
#module_type = module_type)
#s = object_cache(module_object_preload,
# user,
# module_type,
# module_id)
s = StudentModule.objects.filter(student=request.user,
module_id=module_id,
module_type = module_type)
if len(s) == 0:
s=None
else:
s=s[0]
if s == None: # If nothing in the database...
state=None
else: