Fix #372 -- Plugin hook for "Copy from event"

This commit is contained in:
Raphael Michel
2017-04-26 15:24:16 +02:00
parent 39513448f3
commit bbe272c35c
3 changed files with 20 additions and 1 deletions

View File

@@ -226,6 +226,8 @@ class Event(LoggedModel):
def copy_data_from(self, other):
from . import ItemAddOn, ItemCategory, Item, Question, Quota
from ..signals import event_copy_data
self.plugins = other.plugins
self.save()
@@ -297,6 +299,8 @@ class Event(LoggedModel):
s.value = 'file://' + newname
s.save()
event_copy_data.send(sender=self, other=other)
def generate_invite_token():
return get_random_string(length=32, allowed_chars=string.ascii_lowercase + string.digits)