Update owner when the user is merged

This commit is contained in:
Ilias Trichopoulos 2015-04-09 14:27:41 +02:00 committed by Adrian Moennich
parent 4ef7c3b48e
commit 44acb37507

View File

@ -337,7 +337,10 @@ class VidyoPlugin(VCPluginMixin, IndicoPlugin):
super(VidyoPlugin, self)._merge_users(user, merged, **kwargs)
new_id = int(user.id)
old_id = int(merged.id)
VidyoExtension.find(owned_by_id=old_id).update({'owned_by_id': new_id})
for ext in VidyoExtension.find(owned_by_id=old_id):
ext.owned_by_id = new_id
ext.vc_room.data['owner'] = user.user.as_principal
flag_modified(ext.vc_room, 'data')
def get_notification_cc_list(self, action, vc_room, event):
owner = retrieve_principal(vc_room.data['owner'])