1
0
mirror of https://github.com/django/django.git synced 2025-10-27 15:46:10 +00:00

Renamed "object" argument of ModelAdmin.log_addition(), log_change(), and log_deletion() methods.

This commit is contained in:
David Sanders
2021-05-19 12:07:48 -07:00
committed by Mariusz Felisiak
parent 2978c63a34
commit 736bb9868a
3 changed files with 16 additions and 13 deletions

View File

@@ -7,12 +7,12 @@ site = admin.AdminSite(name='custom_user_admin')
class CustomUserAdmin(UserAdmin):
def log_change(self, request, object, message):
def log_change(self, request, obj, message):
# LogEntry.user column doesn't get altered to expect a UUID, so set an
# integer manually to avoid causing an error.
original_pk = request.user.pk
request.user.pk = 1
super().log_change(request, object, message)
super().log_change(request, obj, message)
request.user.pk = original_pk