More preferred name
This commit is contained in:
parent
847f4bea92
commit
0c0b7ce3a7
|
@ -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
|
||||||
|
|
|
@ -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']
|
||||||
|
|
Loading…
Reference in New Issue
Block a user