Add remote user test before the task is called

This commit is contained in:
Joachim 2022-12-19 22:26:09 +01:00
parent e9abae9b7d
commit a44f427d84

View file

@ -526,6 +526,11 @@ def preview_image(instance, *args, **kwargs):
"""create preview images when user is updated"""
if not ENABLE_PREVIEW_IMAGES:
return
# don't call the task for remote users
if not instance.local:
return
changed_fields = instance.field_tracker.changed()
if len(changed_fields) > 0: