Skip to content

Commit

Permalink
feat: return modified field on get component endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
rpenido committed Sep 23, 2024
1 parent a2e2959 commit dd5a095
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions openedx/core/djangoapps/content_libraries/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ class LibraryXBlockMetadataSerializer(serializers.Serializer):
last_draft_created_by = serializers.CharField(read_only=True)
has_unpublished_changes = serializers.BooleanField(read_only=True)
created = serializers.DateTimeField(format=DATETIME_FORMAT, read_only=True)
modified = serializers.DateTimeField(format=DATETIME_FORMAT, read_only=True)

# When creating a new XBlock in a library, the slug becomes the ID part of
# the definition key and usage key:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,7 @@ def test_library_paste_clipboard(self):

# Check that the new block was created after the paste and it's content matches
# the the block in the clipboard
block_data["created"] = paste_data["created"] # The created date will be different
self.assertDictContainsEntries(self._get_library_block(paste_data["id"]), {
**block_data,
"last_draft_created_by": None,
Expand Down

0 comments on commit dd5a095

Please sign in to comment.