Suppress log message if order sync didn't perform any changes

This commit is contained in:
Mira Weller
2025-06-26 17:55:03 +02:00
parent 0f7ee1dc3b
commit 87ee6fbce4

View File

@@ -261,10 +261,11 @@ class OutboundSyncProvider:
})
sq.delete()
else:
sq.order.log_action("pretix.event.order.data_sync.success", {
"provider": self.identifier,
"objects": mapped_objects
})
if not all(res.get("action", "") == "nothing_to_do" for res in mapped_objects.values()):
sq.order.log_action("pretix.event.order.data_sync.success", {
"provider": self.identifier,
"objects": mapped_objects
})
sq.delete()
@cached_property
@@ -334,6 +335,9 @@ class OutboundSyncProvider:
"external_id_field": external_id_field,
"id_value": id_value,
# optional:
"action": "nothing_to_do", # to inform that no action was taken, because the data was already up-to-date
# optional:
"external_link_href": "https://external-system.example.com/backend/link/to/contact/123/",
"external_link_display_name": "Contact #123 - Jane Doe",