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 Jul 26, 2024
1 parent 089b34a commit a6aaaa6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion openedx/core/djangoapps/content_libraries/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,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)
has_unpublished_changes = attr.ib(False)
Expand All @@ -218,7 +219,8 @@ def from_component(cls, library_key, component):
created=component.created,
modified=component.versioning.draft.created,
last_published=None if last_publish_log is None else last_publish_log.published_at,
has_unpublished_changes=component.versioning.has_unpublished_changes
has_unpublished_changes=component.versioning.has_unpublished_changes,
version_num=component.versioning.draft.version_num,
)


Expand Down

0 comments on commit a6aaaa6

Please sign in to comment.