From 324fe3b66fd5295ebf46e4c2462be0b7f6200a4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ste=CC=81phane=20Klein?= Date: Wed, 10 Jun 2015 11:23:45 +0200 Subject: [PATCH] Before this fix, role is empty when AccountCreated event was executed (see https://github.com/modoboa/modoboa-admin-limits/pull/3 ) --- modoboa/core/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modoboa/core/models.py b/modoboa/core/models.py index 0095c0fcc..5e3bb14e4 100644 --- a/modoboa/core/models.py +++ b/modoboa/core/models.py @@ -377,8 +377,9 @@ class User(PermissionsMixin): self.first_name = row[3].strip() self.last_name = row[4].strip() self.is_active = (row[5].strip() in ["True", "1", "yes", "y"]) - self.save(creator=user) + self.save() self.set_role(desired_role) + self.post_create(user) if len(row) < 8: return events.raiseEvent("AccountImported", user, self, row[7:])