diff --git a/docs/release-notes/version-3.0.md b/docs/release-notes/version-3.0.md index 2389d6730..701f6b74a 100644 --- a/docs/release-notes/version-3.0.md +++ b/docs/release-notes/version-3.0.md @@ -2,14 +2,18 @@ ## v3.0.2 (FUTURE) +### Bug Fixes + * [#7131](https://github.com/netbox-community/netbox/issues/7131) - Fix issue where Site fields were hidden when editing a VLAN group * [#7148](https://github.com/netbox-community/netbox/issues/7148) - Fix issue where static query parameters with multiple values were not queried properly * [#7153](https://github.com/netbox-community/netbox/issues/7153) - Allow clearing of assigned device type images * [#7164](https://github.com/netbox-community/netbox/issues/7164) - Fix styling of "decommissioned" label for circuits * [#7169](https://github.com/netbox-community/netbox/issues/7169) - Fix CSV import file upload * [#7176](https://github.com/netbox-community/netbox/issues/7176) - Fix issue where query parameters were duplicated across different forms of the same type +* [#7188](https://github.com/netbox-community/netbox/issues/7188) - Fix issue where select fields with `null_option` did not render or send the null option +* [#7189](https://github.com/netbox-community/netbox/issues/7189) - Set connection factory for django-redis when Sentinel is in use * [#7193](https://github.com/netbox-community/netbox/issues/7193) - Fix prefix (flat) template issue when viewing child prefixes with prefixes available -* [#7202](https://github.com/netbox-community/netbox/issues/7202) - Verify integrity of static assets in CI +* [#7209](https://github.com/netbox-community/netbox/issues/7209) - Allow unlimited API results when `MAX_PAGE_SIZE` is disabled --- diff --git a/netbox/netbox/api/pagination.py b/netbox/netbox/api/pagination.py index 77af755ce..e34cb27d0 100644 --- a/netbox/netbox/api/pagination.py +++ b/netbox/netbox/api/pagination.py @@ -34,13 +34,22 @@ class OptionalLimitOffsetPagination(LimitOffsetPagination): return list(queryset[self.offset:]) def get_limit(self, request): - limit = super().get_limit(request) + if self.limit_query_param: + try: + limit = int(request.query_params[self.limit_query_param]) + if limit < 0: + raise ValueError() + # Enforce maximum page size, if defined + if settings.MAX_PAGE_SIZE: + if limit == 0: + return settings.MAX_PAGE_SIZE + else: + return min(limit, settings.MAX_PAGE_SIZE) + return limit + except (KeyError, ValueError): + pass - # Enforce maximum page size - if settings.MAX_PAGE_SIZE: - limit = min(limit, settings.MAX_PAGE_SIZE) - - return limit + return self.default_limit def get_next_link(self): diff --git a/netbox/project-static/dist/netbox.js b/netbox/project-static/dist/netbox.js index 92ffda9de..e4d0f8d8c 100644 Binary files a/netbox/project-static/dist/netbox.js and b/netbox/project-static/dist/netbox.js differ diff --git a/netbox/project-static/dist/netbox.js.map b/netbox/project-static/dist/netbox.js.map index 678ca7255..10b2b5ae5 100644 Binary files a/netbox/project-static/dist/netbox.js.map and b/netbox/project-static/dist/netbox.js.map differ diff --git a/netbox/project-static/src/select/api/apiSelect.ts b/netbox/project-static/src/select/api/apiSelect.ts index 11576c53f..690608113 100644 --- a/netbox/project-static/src/select/api/apiSelect.ts +++ b/netbox/project-static/src/select/api/apiSelect.ts @@ -58,6 +58,12 @@ export class APISelect { */ public readonly emptyOption: Option; + /** + * Null option. When `data-null-option` attribute is a string, the value is used to created an + * option of type `{text: '': 'null'}`. + */ + public readonly nullOption: Nullable