Skip to content

Commit 18fcf5c

Browse files
fix: code was passing user instead of user.id
1 parent 69b4720 commit 18fcf5c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • openedx/core/djangoapps/content_libraries/api

openedx/core/djangoapps/content_libraries/api/blocks.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,8 +837,10 @@ def import_staged_content_from_user_clipboard(library_key: LibraryLocatorV2, use
837837
Returns the newly created item metadata
838838
"""
839839
from openedx.core.djangoapps.content_staging import api as content_staging_api
840+
if user is None or user.id is None:
841+
raise RuntimeError("A user is required.") # Shouldn't happen - mostly here for type checker
840842

841-
user_clipboard = content_staging_api.get_user_clipboard(user)
843+
user_clipboard = content_staging_api.get_user_clipboard(user.id)
842844
if not user_clipboard:
843845
raise ValidationError("The user's clipboard is empty")
844846

0 commit comments

Comments
 (0)