From 545e01bc463a9eb4e1d9cd3bfbf218a36161332e Mon Sep 17 00:00:00 2001 From: Ashish Acharya Date: Fri, 16 Aug 2024 11:52:04 -0500 Subject: [PATCH] Fix circular import of the CandidateURL model --- sde_collections/models/collection.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sde_collections/models/collection.py b/sde_collections/models/collection.py index 1da83364..da1a8f0c 100644 --- a/sde_collections/models/collection.py +++ b/sde_collections/models/collection.py @@ -19,7 +19,6 @@ format_slack_message, send_slack_message, ) -from .candidate_url import CandidateURL from .collection_choice_fields import ( ConnectorChoices, CurationStatusChoices, @@ -111,7 +110,7 @@ def add_to_public_query(self): @property def included_urls_count(self): - return CandidateURL.objects.filter(collection=self, excluded=False).count() + return self.candidate_urls.filter(excluded=False).count() @property def _scraper_config_path(self) -> str: