Browse Source

fix deletion step showstopper

Rafał Pitoń 9 years ago
parent
commit
39986f4022
1 changed files with 3 additions and 5 deletions
  1. 3 5
      misago/users/views/admin/users.py

+ 3 - 5
misago/users/views/admin/users.py

@@ -313,13 +313,11 @@ class DeletionStep(UserAdmin, generic.ButtonView):
             return _("This action can't be accessed directly")
 
         if target.is_staff or target.is_superuser:
-            message = _("%(user)s is admin and can't be deleted.")
-            return message % {'user': user.username}
+            return _("%(user)s is admin and can't be deleted.") % {'user': target.username}
 
     def execute_step(self, user):
-        raise NotImplementedError("execute_step method should return dict "
-                                  "with number of deleted_count and "
-                                  "is_completed keys")
+        raise NotImplementedError(
+            "execute_step method should return dict with number of deleted_count and is_completed keys")
 
     def button_action(self, request, target):
         return JsonResponse(self.execute_step(target))