mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Fix critical error in previous commit
This commit is contained in:
@@ -244,13 +244,14 @@ class SubEventViewSet(ConditionalListView, viewsets.ModelViewSet):
|
||||
)
|
||||
|
||||
def perform_update(self, serializer):
|
||||
if serializer.data == self.get_serializer(instance=serializer.instance).data:
|
||||
original_data = self.get_serializer(instance=serializer.instance).data
|
||||
super().perform_update(serializer)
|
||||
|
||||
if serializer.data == original_data:
|
||||
# Performance optimization: If nothing was changed, we do not need to save or log anything.
|
||||
# This costs us a few cycles on save, but avoids thousands of lines in our log.
|
||||
return
|
||||
|
||||
super().perform_update(serializer)
|
||||
|
||||
serializer.instance.log_action(
|
||||
'pretix.subevent.changed',
|
||||
user=self.request.user,
|
||||
|
||||
Reference in New Issue
Block a user