mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
Define LogEntryTypes for all actions in pretix core, improve content_object handling (#4768)
Create LogEntryType definitions for all missing action_types (order changes, check-in events, settings changes of PaymentProviders and TicketOutputs). Check whether the stored content_object is of the expected model type, preventing incorrect links. Refactoring: - Move the base LogEntryType definitions for our models to their own file - Move HTML escaping into make_link to make it less likely to oversee in the LogEntryType definitions - Log pretix.event.order.deleted with the deleted Order model as content_object, matching the other *.deleted action_types
This commit is contained in:
@@ -40,7 +40,7 @@ from django.contrib.contenttypes.models import ContentType
|
||||
from django.db import models
|
||||
from django.utils.functional import cached_property
|
||||
|
||||
from pretix.base.logentrytypes import log_entry_types, make_link
|
||||
from pretix.base.logentrytype_registry import log_entry_types, make_link
|
||||
from pretix.base.signals import is_app_active, logentry_object_link
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ class LogEntry(models.Model):
|
||||
def display(self):
|
||||
log_entry_type, meta = log_entry_types.get(action_type=self.action_type)
|
||||
if log_entry_type:
|
||||
return log_entry_type.display(self)
|
||||
return log_entry_type.display(self, self.parsed_data)
|
||||
|
||||
from ..signals import logentry_display
|
||||
|
||||
|
||||
Reference in New Issue
Block a user