Skip to content

Commit

Permalink
feat: add version_num to LibraryXBlockMetadata
Browse files Browse the repository at this point in the history
  • Loading branch information
kdmccormick committed Sep 23, 2024
1 parent 7a96c0b commit cdc402f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions openedx/core/djangoapps/content_libraries/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ class LibraryXBlockMetadata:
usage_key = attr.ib(type=LibraryUsageLocatorV2)
created = attr.ib(type=datetime)
modified = attr.ib(type=datetime)
version_num = attr.ib(type=int)
display_name = attr.ib("")
last_published = attr.ib(default=None, type=datetime)
last_draft_created = attr.ib(default=None, type=datetime)
Expand Down Expand Up @@ -255,6 +256,7 @@ def from_component(cls, library_key, component):
last_draft_created=last_draft_created,
last_draft_created_by=last_draft_created_by,
has_unpublished_changes=component.versioning.has_unpublished_changes,
version_num=component.versioning.draft.version_num,
)


Expand Down

0 comments on commit cdc402f

Please sign in to comment.