Skip to content

Commit fdf645d

Browse files
committed
fix: Make copy_function optional
1 parent 94bc698 commit fdf645d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

djangocms_versioning/datastructures.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def __init__(
3030
self,
3131
content_model: type[models.Model],
3232
grouper_field_name: str,
33-
copy_function: callable,
33+
copy_function: callable | None = None,
3434
extra_grouping_fields: Iterable[str] | None = None,
3535
version_list_filter_lookups: dict[str, Any] | None = None,
3636
on_publish=None,
@@ -55,7 +55,7 @@ def __init__(
5555
# Set the grouper selector label
5656
self.grouper_selector_option_label = grouper_selector_option_label
5757
self.version_list_filter_lookups = version_list_filter_lookups or {}
58-
self.copy_function = copy_function
58+
self.copy_function = copy_function or default_copy
5959
self.on_publish = on_publish
6060
self.on_unpublish = on_unpublish
6161
self.on_draft_create = on_draft_create

0 commit comments

Comments
 (0)