Skip to content

Commit

Permalink
- do NOT consider an unfinished reparse event to be the latest reparse
Browse files Browse the repository at this point in the history
  • Loading branch information
elipe17 committed Dec 17, 2024
1 parent 6949e82 commit defdbea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tdrs-backend/tdpservice/data_files/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def get_has_error(self, obj):

def get_latest_reparse_file_meta(self, instance):
"""Return related reparse_file_metas, ordered by finished_at decending."""
reparse_file_metas = instance.reparse_file_metas.all().order_by('-finished_at')
reparse_file_metas = instance.reparse_file_metas.all().exclude(finished_at=None).order_by('-finished_at')
if reparse_file_metas.count() > 0:
return ReparseFileMetaSerializer(reparse_file_metas.first(), many=False, read_only=True).data
return None
Expand Down

0 comments on commit defdbea

Please sign in to comment.