Fixes: #19917 - Fix MAC address pagination duplicates by adding 'pk' to model ordering #1574

Closed
opened 2026-04-06 04:10:36 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @jseifeddine on 7/28/2025

Fixes: #19917

Fix MAC address pagination by ensuring deterministic ordering
Add pk to MACAddress model ordering to ensure deterministic results
when multiple MAC addresses have the same value. This prevents the same
MAC address from appearing on multiple pages during pagination.

The issue occurred because Django's default ordering by 'mac_address'
alone is non-deterministic when multiple records share the same MAC
address value, causing inconsistent pagination results.

*Originally created by @jseifeddine on 7/28/2025* ### Fixes: #19917 Fix MAC address pagination by ensuring deterministic ordering Add `pk` to MACAddress model ordering to ensure deterministic results when multiple MAC addresses have the same value. This prevents the same MAC address from appearing on multiple pages during pagination. The issue occurred because Django's default ordering by 'mac_address' alone is non-deterministic when multiple records share the same MAC address value, causing inconsistent pagination results.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#1574