Skip to content

Commit

Permalink
Fix 500 on searching userpermissions in Django admin (#4617)
Browse files Browse the repository at this point in the history
rnovak338 authored Jan 14, 2025
1 parent b722bbc commit 61aa40e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/users/admin.py
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ def assigned_groups(self, obj):
@admin.register(UserPermission)
class UserPermissionAdmin(admin.ModelAdmin):
list_display = ["user", "email", "permission"]
search_fields = ("email", "permission", "user")
search_fields = ("email", "permission__slug", "user__username")
fields = ["email", "permission"]

def save_model(self, request, obj, form, change):

0 comments on commit 61aa40e

Please sign in to comment.