From 74d802d2ec11155c54e30c84568d7629ee979668 Mon Sep 17 00:00:00 2001 From: Mira Weller Date: Thu, 16 Jan 2025 11:48:22 +0100 Subject: [PATCH] Default implementation for object_link_args --- src/pretix/base/logentrytypes.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pretix/base/logentrytypes.py b/src/pretix/base/logentrytypes.py index a14d8c251..c1b704a3f 100644 --- a/src/pretix/base/logentrytypes.py +++ b/src/pretix/base/logentrytypes.py @@ -168,9 +168,11 @@ class EventLogEntryType(LogEntryType): 'val': escape(self.object_link_display_name(logentry.content_object)), } - def object_link_argvalue(self, content_object): - """Return the identifier used in a link to content_object.""" - return content_object.id + def object_link_args(self, content_object): + """Return the kwargs for the url used in a link to content_object.""" + if hasattr(self, 'object_link_argname'): + return {self.object_link_argname: content_object.pk} + return {} def object_link_display_name(self, content_object): """Return the display name to refer to content_object in the user interface."""