More preferred name

This commit is contained in:
Tanner Collin 2022-08-27 06:55:55 +00:00
parent 847f4bea92
commit 0c0b7ce3a7
2 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ from . import models
from .permissions import is_admin_director from .permissions import is_admin_director
def get_object_owner(obj): def get_object_owner(obj):
full_name = lambda member: member.first_name + ' ' + member.last_name full_name = lambda member: member.preferred_name + ' ' + member.last_name
if obj.__class__.__name__ == 'Member': if obj.__class__.__name__ == 'Member':
return full_name(obj), obj.id return full_name(obj), obj.id

View File

@ -570,7 +570,7 @@ class LockoutViewSet(viewsets.ViewSet, List):
authorization = {} authorization = {}
authorization['id'] = member.id authorization['id'] = member.id
authorization['name'] = member.first_name + ' ' + member.last_name authorization['name'] = member.preferred_name + ' ' + member.last_name
authorization['common'] = bool(member.orientation_date or member.vetted_date) authorization['common'] = bool(member.orientation_date or member.vetted_date)
authorization['lathe'] = bool(member.lathe_cert_date) and authorization['common'] authorization['lathe'] = bool(member.lathe_cert_date) and authorization['common']
authorization['mill'] = bool(member.mill_cert_date) and authorization['common'] authorization['mill'] = bool(member.mill_cert_date) and authorization['common']