mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-15 08:12:18 -06:00
Compare commits
1 Commits
main
...
21118-site
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8cbfe94fba |
@@ -211,12 +211,16 @@ def sync_cached_scope_fields(instance, created, **kwargs):
|
||||
for model in (Prefix, Cluster, WirelessLAN):
|
||||
qs = model.objects.filter(**filters)
|
||||
|
||||
# Bulk update cached fields to avoid O(N) performance issues with large datasets.
|
||||
# This does not trigger post_save signals, avoiding spurious change log entries.
|
||||
objects_to_update = []
|
||||
for obj in qs:
|
||||
# Recompute cache using the same logic as save()
|
||||
obj.cache_related_objects()
|
||||
obj.save(update_fields=[
|
||||
'_location',
|
||||
'_site',
|
||||
'_site_group',
|
||||
'_region',
|
||||
])
|
||||
objects_to_update.append(obj)
|
||||
|
||||
if objects_to_update:
|
||||
model.objects.bulk_update(
|
||||
objects_to_update,
|
||||
['_location', '_site', '_site_group', '_region']
|
||||
)
|
||||
|
||||
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2026-01-15 05:05+0000\n"
|
||||
"POT-Creation-Date: 2026-01-13 05:05+0000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@@ -12489,8 +12489,8 @@ msgstr ""
|
||||
msgid "Delete Selected"
|
||||
msgstr ""
|
||||
|
||||
#: netbox/netbox/plugins/navigation.py:53
|
||||
#: netbox/netbox/plugins/navigation.py:89
|
||||
#: netbox/netbox/plugins/navigation.py:55
|
||||
#: netbox/netbox/plugins/navigation.py:88
|
||||
msgid "Permissions must be passed as a tuple or list."
|
||||
msgstr ""
|
||||
|
||||
@@ -12498,7 +12498,7 @@ msgstr ""
|
||||
msgid "Buttons must be passed as a tuple or list."
|
||||
msgstr ""
|
||||
|
||||
#: netbox/netbox/plugins/navigation.py:95
|
||||
#: netbox/netbox/plugins/navigation.py:92
|
||||
msgid "Button color must be a choice within ButtonColorChoices."
|
||||
msgstr ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user