Commits

Anonymous committed 03bc58a

Set zapped_by to a current user

  • Participants
  • Parent commits 3abc18b

Comments (0)

Files changed (1)

File djangobb_forum/admin.py

     link_to_post.short_description = _("Link to post")
     link_to_post.allow_tags = True
 
+    def save_model(self, request, obj, form, change):
+        if change and obj.zapped:
+            obj.zapped_by = request.user
+            obj.save()
+
 class BanAdmin(BaseModelAdmin):
     list_display = ['user', 'ban_start', 'ban_end', 'reason']
     raw_id_fields = ['user']