Skip to content

Commit

Permalink
docs: update create next component version docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian2012 committed Oct 29, 2024
1 parent 07b4d07 commit 74ac2d9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions openedx_learning/apps/authoring/components/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ def create_next_component_version(
local path/key for a file, to ``Content.id`` or content bytes values. Using
`None` for a value in this dict means to delete that key in the next version.
Make sure to wrap the function call on a atomic statement:
``with transaction.atomic():``
It is okay to mark entries for deletion that don't exist. For instance, if a
version has ``a.txt`` and ``b.txt``, sending a ``content_to_replace`` value
of ``{"a.txt": None, "c.txt": None}`` will remove ``a.txt`` from the next
Expand Down

0 comments on commit 74ac2d9

Please sign in to comment.