Pass image PK to set_image_focal_point_task as a string

Using a non-integer primary key on an image model is not formally supported or tested, but it's possible someone might try it, and there's no harm in getting into the habit of stringifying PKs that we pass to tasks.
pull/12874/head
Matt Westcott 2025-02-13 14:21:53 +00:00
rodzic c865c8a1f3
commit 995203f42e
1 zmienionych plików z 1 dodań i 1 usunięć
wagtail/images

Wyświetl plik

@ -27,7 +27,7 @@ def post_save_image_feature_detection(instance, **kwargs):
if kwargs["raw"] is False and not instance.has_focal_point():
# Set the focal point
set_image_focal_point_task.enqueue(
instance._meta.app_label, instance._meta.model_name, instance.pk
instance._meta.app_label, instance._meta.model_name, str(instance.pk)
)