Skip to content

Commit

Permalink
fix: Editing of existing snippet not allows (unversioned snippets)
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun authored Jan 21, 2025
1 parent 62bb317 commit 3e5816f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/djangocms_snippet/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ def clean(self):
name = data.get("name")
slug = data.get("slug")
snippet_grouper = data.get("snippet_grouper")
snippet_queryset = Snippet.objects.all()

if djangocms_versioning_enabled and is_versioning_installed and snippet_grouper:
snippet_queryset = snippet_queryset.exclude(snippet_grouper=snippet_grouper)
snippet_queryset = Snippet.objects.exclude(snippet_grouper=snippet_grouper)

for snippet in snippet_queryset:
if snippet.name == name:
Expand Down

0 comments on commit 3e5816f

Please sign in to comment.