Remove select_for_update option for FieldDataCache
We've already been ignoring the param for a long time. This just removes it entirely.
This commit is contained in:
@@ -687,7 +687,7 @@ class FieldDataCache(object):
|
||||
A cache of django model objects needed to supply the data
|
||||
for a module and its descendants
|
||||
"""
|
||||
def __init__(self, descriptors, course_id, user, select_for_update=False, asides=None, read_only=False):
|
||||
def __init__(self, descriptors, course_id, user, asides=None, read_only=False):
|
||||
"""
|
||||
Find any courseware.models objects that are needed by any descriptor
|
||||
in descriptors. Attempts to minimize the number of queries to the database.
|
||||
@@ -698,7 +698,6 @@ class FieldDataCache(object):
|
||||
descriptors: A list of XModuleDescriptors.
|
||||
course_id: The id of the current course
|
||||
user: The user for which to cache data
|
||||
select_for_update: Ignored
|
||||
asides: The list of aside types to load, or None to prefetch no asides.
|
||||
read_only: We should not perform writes (they become a no-op).
|
||||
"""
|
||||
@@ -785,7 +784,7 @@ class FieldDataCache(object):
|
||||
@classmethod
|
||||
def cache_for_descriptor_descendents(cls, course_id, user, descriptor, depth=None,
|
||||
descriptor_filter=lambda descriptor: True,
|
||||
select_for_update=False, asides=None, read_only=False):
|
||||
asides=None, read_only=False):
|
||||
"""
|
||||
course_id: the course in the context of which we want StudentModules.
|
||||
user: the django user for whom to load modules.
|
||||
@@ -794,9 +793,8 @@ class FieldDataCache(object):
|
||||
the supplied descriptor. If depth is None, load all descendant StudentModules
|
||||
descriptor_filter is a function that accepts a descriptor and return whether the field data
|
||||
should be cached
|
||||
select_for_update: Ignored
|
||||
"""
|
||||
cache = FieldDataCache([], course_id, user, select_for_update, asides=asides, read_only=read_only)
|
||||
cache = FieldDataCache([], course_id, user, asides=asides, read_only=read_only)
|
||||
cache.add_descriptor_descendents(descriptor, depth, descriptor_filter)
|
||||
return cache
|
||||
|
||||
|
||||
Reference in New Issue
Block a user