ep detail get_location bug

This commit is contained in:
caoqianming 2022-10-26 08:42:50 +08:00
parent 738da6d183
commit 12c5aa5996
1 changed files with 1 additions and 1 deletions

View File

@ -160,7 +160,7 @@ class EmployeeDetailSerializer(EmployeeSerializer):
ep_loc_dict = cache.get(key_str, None)
if ep_loc_dict:
area_fix_id = ep_loc_dict.get('arex_fix_id', None)
ep_loc_dict['area_fix_name'] = Area.objects.get(id=area_fix_id).name
ep_loc_dict['area_fix_name'] = Area.objects.get(id=area_fix_id).name if area_fix_id else None
return ep_loc_dict