Merge pull request #22132 from philanthropy-u/saad/fix_visible_blocks_hash_value

Fixed exception in VisibleBlocks.bulk_create due to incorrect argument passed
This commit is contained in:
Ned Batchelder
2019-10-29 11:14:52 -04:00
committed by GitHub

View File

@@ -232,7 +232,7 @@ class VisibleBlocks(models.Model):
only for those that aren't already created.
"""
cached_records = cls.bulk_read(user_id, course_key)
non_existent_brls = {brl.hash_value for brl in block_record_lists if brl.hash_value not in cached_records}
non_existent_brls = {brl for brl in block_record_lists if brl.hash_value not in cached_records}
cls.bulk_create(user_id, course_key, non_existent_brls)
@classmethod