forked from CGM_Public/pretix_original
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:
@@ -355,7 +355,7 @@ class Order(LockModel, LoggedModel):
|
||||
|
||||
if not self.testmode:
|
||||
raise TypeError("Only test mode orders can be deleted.")
|
||||
self.event.log_action(
|
||||
self.log_action(
|
||||
'pretix.event.order.deleted', user=user, auth=auth,
|
||||
data={
|
||||
'code': self.code,
|
||||
|
||||
Reference in New Issue
Block a user