From 7fa5bc0fbcd67776848b21c9bdcbaf9bd8953216 Mon Sep 17 00:00:00 2001 From: rgraber Date: Wed, 15 Jan 2025 08:42:55 -0500 Subject: [PATCH] fixup!: accidental change --- kobo/apps/audit_log/serializers.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/kobo/apps/audit_log/serializers.py b/kobo/apps/audit_log/serializers.py index 04e7c9412c..4130e47279 100644 --- a/kobo/apps/audit_log/serializers.py +++ b/kobo/apps/audit_log/serializers.py @@ -66,14 +66,7 @@ def get_date_created(self, audit_log): return audit_log['date_created'].strftime('%Y-%m-%dT%H:%M:%SZ') -class ProjectHistoryLogSerializer(serializers.ModelSerializer): - user = serializers.HyperlinkedRelatedField( - queryset=get_user_model().objects.all(), - lookup_field='username', - view_name='user-kpi-detail', - ) - date_created = serializers.SerializerMethodField() - username = serializers.SerializerMethodField() +class ProjectHistoryLogSerializer(AuditLogSerializer): class Meta: model = ProjectHistoryLog @@ -94,9 +87,3 @@ class Meta: 'metadata', 'date_created', ) - - 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): - return audit_log.user.username