Cloning events: Copy *relative* admission time

This commit is contained in:
Raphael Michel
2020-11-24 10:55:45 +01:00
parent c340fd9d97
commit 4b422571ad
2 changed files with 7 additions and 3 deletions

View File

@@ -559,7 +559,8 @@ class Event(EventMixin, LoggedModel):
self.plugins = other.plugins
self.is_public = other.is_public
self.date_admission = other.date_admission
if other.date_admission:
self.date_admission = self.date_from + (other.date_admission - other.date_from)
self.testmode = other.testmode
self.save()
self.log_action('pretix.object.cloned', data={'source': other.slug, 'source_id': other.pk})