From 6c3ac7539f8b4a7e4fb5567e0fc4a373736b240b Mon Sep 17 00:00:00 2001 From: Dolsy Smith Date: Wed, 7 Apr 2021 09:23:45 -0400 Subject: [PATCH] Fixes #1052: column heading bug (#1061) --- docs/collections.rst | 2 ++ sfm/ui/views.py | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/collections.rst b/docs/collections.rst index 68163e02..aa437523 100644 --- a/docs/collections.rst +++ b/docs/collections.rst @@ -82,6 +82,8 @@ want to run the search once and then turn off the collection. See :ref:`guide-incremental-collecting` to decide whether or not to collect incrementally. +Only one active seed can be used per search collection. If you need to run multiple searches in parallel, create a new collection for each search, each with a single seed. + .. _guide-twitter-sample: .. _Twitter sample: diff --git a/sfm/ui/views.py b/sfm/ui/views.py index 9441cf10..359f3b4a 100644 --- a/sfm/ui/views.py +++ b/sfm/ui/views.py @@ -203,6 +203,8 @@ def get_initial_queryset(self): for exclusion in exclude_fields: if exclusion in self.columns: self.columns.remove(exclusion) + # Need to update this property here, because it's used by the get_context_data() method of BaseDataTableView and is set PRIOR to the call to this method + self._columns = self.columns return Seed.objects.filter(collection=self.kwargs['pk'], is_active=self.status == 'active').order_by('token', 'uid') @@ -283,19 +285,19 @@ def get_context_data(self, **kwargs): seed_error_message = None # No active seeds. if self.object.required_seed_count() == 0 and self.object.active_seed_count() != 0: - seed_error_message = "All seeds must be deactivated before harvesting can be turned on." + seed_error_message = "All seeds must be deleted before harvesting can be turned on." # Specific number of active seeds. elif self.object.required_seed_count() == 1: if self.object.active_seed_count() == 0: seed_warning_message = "1 active seed must be added before harvesting can be turned on." elif self.object.active_seed_count() > 1: - seed_error_message = "Deactivate all seeds except 1 before harvesting can be turned on." + seed_error_message = "Delete all seeds except 1 before harvesting can be turned on." elif self.object.required_seed_count() is not None and self.object.required_seed_count() > 1: if self.object.active_seed_count() < self.object.required_seed_count(): seed_warning_message = "{} active seeds must be added before harvesting can be turned on.".format( self.object.required_seed_count()) elif self.object.active_seed_count > self.object.required_seed_count(): - seed_error_message = "Deactivate all seeds except {} before harvesting can be turned on.".format( + seed_error_message = "Delete all seeds except {} before harvesting can be turned on.".format( self.object.required_seed_count()) # At least one active seeds elif self.object.required_seed_count() is None and self.object.active_seed_count() == 0: