Skip to content

Commit

Permalink
Fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
mrchrisadams committed Nov 15, 2023
1 parent 7f7f0a8 commit 411dc0a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions apps/accounts/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -916,12 +916,14 @@ def get_inlines(self, request, obj):
filtered_inlines.append(inline)
return filtered_inlines

if obj.ip_range_count > 500:
# when we have too many IPs to realistically show on the page
# we top trying to show the GreencheckIPs inline, and instead
# use a link to the relvevant change list in the template.
# see admin/accounts/hostingprovider/change_form.html
if obj and obj.ip_range_count > 500:
if GreencheckIpInline in inlines:
inlines.remove(GreencheckIpInline)

# inlines.remove(GreencheckIpInline)

return inlines

def _changeform_view(self, request, object_id, form_url, extra_context):
Expand Down

0 comments on commit 411dc0a

Please sign in to comment.