Skip to content

Commit

Permalink
Remove dependency on moderation [FidelityInternational#80]
Browse files Browse the repository at this point in the history
  • Loading branch information
marksweb committed Jan 9, 2023
1 parent dd6be80 commit 38451df
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions djangocms_version_locking/monkeypatch/models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from django.utils.translation import gettext_lazy as _

from djangocms_moderation import models as moderation_model
try:
from djangocms_moderation import models as moderation_model
except ImportError:
moderation_model = None
from djangocms_moderation.helpers import (
get_moderated_children_from_placeholder,
)
Expand Down Expand Up @@ -99,4 +102,5 @@ def _add_nested_children(self, version, parent_node):
return added_items


moderation_model.ModerationCollection._add_nested_children = _add_nested_children
if moderation_model:
moderation_model.ModerationCollection._add_nested_children = _add_nested_children

0 comments on commit 38451df

Please sign in to comment.