some updates
This commit is contained in:
+6
-1
@@ -496,7 +496,12 @@ class SeriesBase(models.Model):
|
||||
return format_html('", "'.join(images))
|
||||
|
||||
def get_thumbnail(self, recreate=False, fail_loudly=False):
|
||||
images = self.images.filter(removed=False)
|
||||
# Use prefetched images if available
|
||||
images = getattr(self, '_prefetched_objects_cache', {}).get('images')
|
||||
if images is not None:
|
||||
images = [img for img in images if not img.removed]
|
||||
else:
|
||||
images = self.images.filter(removed=False)
|
||||
|
||||
if len(images) < 1:
|
||||
return "No images", 0
|
||||
|
||||
@@ -2377,7 +2377,6 @@ class ExamViews(View, LoginRequiredMixin):
|
||||
cached_scores = True
|
||||
|
||||
valid_cid_users = set(exam.valid_cid_users.all().values_list("cid", flat=True))
|
||||
print(valid_cid_users)
|
||||
valid_user_users = set(exam.valid_user_users.all().values_list("pk", flat=True))
|
||||
|
||||
if self.app_name in ("rapids"):
|
||||
@@ -2403,7 +2402,6 @@ class ExamViews(View, LoginRequiredMixin):
|
||||
user_ids = set()
|
||||
|
||||
cids_user_id_map = {}
|
||||
cids_name_map = {}
|
||||
|
||||
# Loop through all candidates
|
||||
for cid_user_answer in cid_user_answers:
|
||||
|
||||
Reference in New Issue
Block a user