Skip to content

Fix admin list_display error for PortalProfile and VolunteerProfile #193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yvonnejhao
Copy link

  • Description

This pull request fixes the admin.E108 errors caused by invalid field references in the list_display attributes of PortalProfileAdmin and VolunteerProfileAdmin.

  • Changes made

Replaced "user__first_name", "user__last_name", and "user__email" in list_display with properly defined methods:

get_first_name(self, obj)

get_last_name(self, obj)

get_email(self, obj)

Used @admin.display(...) decorators to allow ordering and customize column names.

  • Reason

Django's list_display does not support double underscore lookups like user__first_name. These need to be replaced with callable attributes or methods to avoid admin.E108 system check errors.

  • Result

The admin panel now displays user first name, last name, and email correctly without triggering system errors.

Copy link

netlify bot commented Jun 13, 2025

👷 Deploy request for pyladiescon-portal-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 1e7435e

@Mariatta
Copy link
Member

Mariatta commented Jul 8, 2025

@yvonnejhao Where did you see the admin.E108 error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants