Skip to content

Commit cbcb310

Browse files
committed
fix: tests
1 parent 1327620 commit cbcb310

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

djangocms_alias/views.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,13 @@ def create_alias_view(request):
144144
emit_content_change([alias_content])
145145

146146
if replace:
147-
create_form.cleaned_data.get("plugin")
147+
plugin = create_form.cleaned_data.get("plugin")
148148
placeholder = create_form.cleaned_data.get("placeholder")
149149
return render_replace_response(
150150
request,
151151
new_plugins=[alias_plugin],
152152
source_placeholder=placeholder,
153-
# source_plugin=plugin,
153+
source_plugin=plugin,
154154
)
155155

156156
return HttpResponse(JAVASCRIPT_SUCCESS_RESPONSE)
@@ -183,7 +183,7 @@ def render_replace_response(request, new_plugins, source_placeholder=None, sourc
183183
"moved_plugins": move_plugins,
184184
"is_popup": True,
185185
}
186-
if source_plugin is not None:
186+
if source_plugin is not None and source_plugin.pk:
187187
context["replaced_plugin"] = json.dumps(
188188
get_plugin_toolbar_info(source_plugin),
189189
)

0 commit comments

Comments
 (0)