ipam/ip-addresses shows 'NoneType' object has no attribute 'get_absolute_url' #7999

Closed
opened 2025-12-29 20:31:02 +01:00 by adam · 2 comments
Owner

Originally created by @fzumpe on GitHub (May 4, 2023).

NetBox version

v3.4.1

Python version

3.8

Steps to Reproduce

  1. Add standalone IP without attached device
  2. Open IPAdresses

Expected Behavior

Show a list of all currently existing IPs

Observed Behavior

Error message and no IPs shown

Originally created by @fzumpe on GitHub (May 4, 2023). ### NetBox version v3.4.1 ### Python version 3.8 ### Steps to Reproduce 1. Add standalone IP without attached device 2. Open IPAdresses ### Expected Behavior Show a list of all currently existing IPs ### Observed Behavior Error message and no IPs shown
adam added the type: bug label 2025-12-29 20:31:02 +01:00
adam closed this issue 2025-12-29 20:31:02 +01:00
Author
Owner

@fzumpe commented on GitHub (May 4, 2023):

I could fix it by editing ipam/tables/ip.py line 383:

    assigned = columns.BooleanColumn(
        accessor='assigned_object_id',
---     linkify=lambda record: record.assigned_object.get_absolute_url(),
+++     linkify=lambda record: (record.assigned_object.get_absolute_url()) if record.assigned_object is not None else False,
        verbose_name='Assigned'
    )
@fzumpe commented on GitHub (May 4, 2023): I could fix it by editing ipam/tables/ip.py line 383: ``` assigned = columns.BooleanColumn( accessor='assigned_object_id', --- linkify=lambda record: record.assigned_object.get_absolute_url(), +++ linkify=lambda record: (record.assigned_object.get_absolute_url()) if record.assigned_object is not None else False, verbose_name='Assigned' ) ```
Author
Owner

@jeremystretch commented on GitHub (May 4, 2023):

I'm not able to replicate this on v3.5.0. Your NetBox version is rather old; please first try upgrading to v3.4.10. If the problem persists, please identify discrete steps that someone else can take to reproduce the behavior. I'll be happy to re-open this if needed, but I suspect upgrading will address the bug.

@jeremystretch commented on GitHub (May 4, 2023): I'm not able to replicate this on v3.5.0. Your NetBox version is rather old; please first try upgrading to v3.4.10. If the problem persists, please identify discrete steps that someone else can take to reproduce the behavior. I'll be happy to re-open this if needed, but I suspect upgrading will address the bug.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7999