Upgrade to hierarkey 2.0 (#5373)

* Upgrade to hierarkey 2.0

* Fix duplicate setting of timezone

* Rebase migration
This commit is contained in:
Raphael Michel
2025-08-18 11:41:57 +02:00
committed by GitHub
parent 69e50d35a7
commit 626d7ecc90
3 changed files with 34 additions and 3 deletions

View File

@@ -1085,7 +1085,7 @@ class Event(EventMixin, LoggedModel):
s.save(force_insert=True)
valid_sales_channel_identifers = set(self.organizer.sales_channels.values_list("identifier", flat=True))
skip_settings = (
skip_settings = {
'ticket_secrets_pretix_sig1_pubkey',
'ticket_secrets_pretix_sig1_privkey',
# no longer used, but we still don't need to copy them
@@ -1093,7 +1093,10 @@ class Event(EventMixin, LoggedModel):
'presale_css_checksum',
'presale_widget_css_file',
'presale_widget_css_checksum',
)
} | {
# Some settings might already exist due to e.g. the timezone being special in the API
s.key for s in self.settings._objects.all()
}
settings_to_save = []
for s in other.settings._objects.all():
if s.key in skip_settings: