Commit 7971a028 by Piotr Mitros

Previous change introduced a bug where Django's ORM would insert instead of…

Previous change introduced a bug where Django's ORM would insert instead of update. Momentary revert.
parent 94a5c750
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment