Skip to content

Commit

Permalink
fixup!: return username lol
Browse files Browse the repository at this point in the history
  • Loading branch information
rgraber committed Jan 13, 2025
1 parent e20e0aa commit bcba30b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kobo/apps/audit_log/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def get_date_created(self, audit_log):
return audit_log.date_created.strftime('%Y-%m-%dT%H:%M:%SZ')

def get_username(self, audit_log):
getattr(audit_log.user, 'username', None)
return getattr(audit_log.user, 'username', None)


class AccessLogSerializer(serializers.Serializer):
Expand Down Expand Up @@ -99,4 +99,4 @@ def get_date_created(self, audit_log):
return audit_log.date_created.strftime('%Y-%m-%dT%H:%M:%SZ')

def get_username(self, audit_log):
getattr(audit_log.user, 'username', None)
return getattr(audit_log.user, 'username', None)

0 comments on commit bcba30b

Please sign in to comment.