Skip to content

Conversation

@abhi1693
Copy link
Member

Fixes: #13047

  • asn_count was defined on the serializer but wasn't showing up in the results
  • Replaced LinkedCountColumn with TemplateColumn due to 2 reasons:
    1. As per my understanding, LinkedCountColumn uses filtersets to find the information. I tried different variations but none worked.
    2. TemplateColumn does not produce a linkified cell, as there is no UI filter on the ASN table for the range

@abhi1693 abhi1693 requested a review from jeremystretch June 29, 2023 14:47
Comment on lines +37 to +40
@extend_schema_field(OpenApiTypes.INT)
def get_asn_count(self, obj):
return obj.get_child_asns().count()

Copy link
Member

Choose a reason for hiding this comment

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

There are two issues with this approach:

  1. It generates a separate query per object in the table.
  2. It prevents us from ordering the table by ASN count.

I've opened #13053 with a more complete (albeit more complex) solution. Please let me know what you think.

@jeremystretch
Copy link
Member

Superseded by #13053

@abhi1693 abhi1693 deleted the fix/13047-asn-count branch July 6, 2023 12:48
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ASN Count is not populated in ASN Ranges view

3 participants