hasattr(obj, employee_user)
This commit is contained in:
parent
50344dfca2
commit
e82e903448
|
@ -133,7 +133,7 @@ class UserStandardSerializer(serializers.ModelSerializer):
|
|||
fields = ['id', 'username', 'name', 'signature']
|
||||
|
||||
def get_signature(self, obj):
|
||||
if obj.employee_user:
|
||||
if hasattr(obj, 'employee_user'):
|
||||
return obj.employee_user.signature
|
||||
return None
|
||||
# class UserStandardSerializer(serializers.ModelSerializer):
|
||||
|
|
Loading…
Reference in New Issue