Skip to content

Commit

Permalink
fix: use len instead of sys.gesizeof method to return the size
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian2012 committed Oct 25, 2024
1 parent a5d9263 commit 0accb24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openedx/core/djangoapps/content_libraries/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
import hashlib
import logging
import mimetypes
import sys


import attr
import requests
Expand Down Expand Up @@ -1228,7 +1228,7 @@ def add_library_block_static_asset_file(usage_key, file_path, file_content, user
return LibraryXBlockStaticFile(
path=file_path,
url=site_root_url + local_path,
size=sys.getsizeof(file_content),
size=len(file_content),
)


Expand Down

0 comments on commit 0accb24

Please sign in to comment.