Nautobot v2.3 changed the way DynamicGroups work and now by default they return a cached list of members in the ORM for DynamicGroup.members and (among others) Device.dynamic_groups. We need to at minimum switch to using DynamicGroup.update_cached_members in place of DynamicGroup.members and potentially call the same for all GC dynamic groups before calling Device.dynamic_groups.
Nautobot v2.3 changed the way DynamicGroups work and now by default they return a cached list of members in the ORM for
DynamicGroup.members
and (among others)Device.dynamic_groups
. We need to at minimum switch to usingDynamicGroup.update_cached_members
in place ofDynamicGroup.members
and potentially call the same for all GC dynamic groups before callingDevice.dynamic_groups
.