Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added affected curated urls count on url pattern pages #1169

Conversation

dhanur-sharma
Copy link

@dhanur-sharma dhanur-sharma commented Dec 24, 2024

  • Collection that is not curated and has delta URLs:
Screenshot 2024-12-24 at 9 52 49 AM
  • Changing workflow status to Curated:
Screenshot 2024-12-24 at 9 53 59 AM

@@ -82,6 +83,10 @@ def get_delta_urls_count(self, obj):
titlepattern = obj.deltatitlepatterns.last()
return titlepattern.delta_urls.count() if titlepattern else 0

def get_curated_urls_count(self, obj):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this is calculating a number that we actually want. By using last() it will give a random value that changes as new patterns are added. Also, it is supplying pattern data for a DeltaUrl. Can you check and see if these values can be removed entirely? Both get_curated_urls_count and get_delta_urls_count? Let's see how and where they are being used.

similarly, lets see if we can get rid of delta_urls_count, curated_urls_count, match_pattern_type.

also look at CuratedUrlSerializer.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The curated_url_count is not needed in the DeltaURLSerializer and has been removed. Removing the delta_urls_count, curated_urls_count, match_pattern_type from the DeltaURLSerializer and CuratedURLSerializer will require more investigation.

Copy link
Contributor

@bishwaspraveen bishwaspraveen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Might have to think more about test cases.

@bishwaspraveen bishwaspraveen merged commit efd3fd6 into dev Jan 8, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a column to display affected delta and curated URLs in the URLs patterns pages
3 participants