From 60d2a37505a19cf7da7902b1140d9a389f4557ae Mon Sep 17 00:00:00 2001 From: Martin Beracochea Date: Mon, 29 Jan 2024 17:22:10 +0000 Subject: [PATCH] Adjust field names to new convention (last_ebi_search_indexed) --- emgapi/management/commands/ebi_search_analysis_dump.py | 4 ++-- emgapi/management/commands/ebi_search_study_dump.py | 4 ++-- emgapi/serializers.py | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/emgapi/management/commands/ebi_search_analysis_dump.py b/emgapi/management/commands/ebi_search_analysis_dump.py index 39d9fd12d..03edb30d3 100644 --- a/emgapi/management/commands/ebi_search_analysis_dump.py +++ b/emgapi/management/commands/ebi_search_analysis_dump.py @@ -211,6 +211,6 @@ def handle(self, *args, **options): # Small buffer into the future so that the indexing time remains ahead of auto-now updated times. for analysis in page: - analysis.last_indexed = nowish + analysis.last_ebi_search_indexed = nowish - AnalysisJob.objects.bulk_update(page, fields=["last_indexed"]) + AnalysisJob.objects.bulk_update(page, fields=["last_ebi_search_indexed"]) diff --git a/emgapi/management/commands/ebi_search_study_dump.py b/emgapi/management/commands/ebi_search_study_dump.py index 888529262..ee14b91c4 100644 --- a/emgapi/management/commands/ebi_search_study_dump.py +++ b/emgapi/management/commands/ebi_search_study_dump.py @@ -103,6 +103,6 @@ def handle(self, *args, **options): # Small buffer into the future so that the indexing time remains ahead of auto-now updated times. for study in studies: - study.last_indexed = nowish + study.last_ebi_search_indexed = nowish - Study.objects.bulk_update(studies, fields=["last_indexed"]) + Study.objects.bulk_update(studies, fields=["last_ebi_search_indexed"]) diff --git a/emgapi/serializers.py b/emgapi/serializers.py index 0079a0c66..0e1a236ff 100644 --- a/emgapi/serializers.py +++ b/emgapi/serializers.py @@ -1021,7 +1021,8 @@ class Meta: 'is_suppressed', 'suppressed_at', 'suppression_reason', - 'last_indexed' + 'last_ebi_search_indexed', + 'last_mgx_indexed', ) @@ -1410,7 +1411,7 @@ class Meta: 'is_suppressed', 'suppression_reason', 'suppressed_at', - 'last_indexed', + 'last_ebi_search_indexed', )