diff --git a/ietf/meeting/models.py b/ietf/meeting/models.py index 6f8963b64..8fadf124d 100644 --- a/ietf/meeting/models.py +++ b/ietf/meeting/models.py @@ -1254,7 +1254,8 @@ class Session(models.Model): return Constraint.objects.filter(target=self.group, meeting=self.meeting).order_by('name__name') def official_timeslotassignment(self): - if not hasattr(self, "_cache_official_timeslotassignment"): + # cache only non-None values + if getattr(self, "_cache_official_timeslotassignment", None) is None: self._cache_official_timeslotassignment = self.timeslotassignments.filter(schedule__in=[self.meeting.schedule, self.meeting.schedule.base if self.meeting.schedule else None]).first() return self._cache_official_timeslotassignment diff --git a/ietf/settings.py b/ietf/settings.py index 9f6284003..15ded9662 100644 --- a/ietf/settings.py +++ b/ietf/settings.py @@ -1295,6 +1295,6 @@ if SERVER_MODE != 'production': # Cannot have this set to True if we're using http: from the dev-server: CSRF_COOKIE_SECURE = False CSRF_COOKIE_SAMESITE = 'Lax' - CSRF_TRUSTED_ORIGINS = ['http://localhost:8000'] + CSRF_TRUSTED_ORIGINS += ['http://localhost:8000'] SESSION_COOKIE_SECURE = False SESSION_COOKIE_SAMESITE = 'Lax' diff --git a/ietf/static/js/list.js b/ietf/static/js/list.js index 6a854afc0..48e9fd486 100644 --- a/ietf/static/js/list.js +++ b/ietf/static/js/list.js @@ -273,14 +273,20 @@ $(document) $(table)[0] .dispatchEvent(new Event("tablesorter:done")); - // if there is a data-default-sort attribute on a column, pre-sort the table on that - const presort_col = $(header_row).children("[data-default-sort]:first"); - if (presort_col) { - const order = presort_col.attr("data-default-sort"); - if (order == "asc" || order == "desc") { - $.each(list_instance, (i, e) => { - e.sort(presort_col.attr("data-sort"), { order: order, sortFunction: text_sort }); - }); + // check if there is a sort query argument, and leave the table alone if so + const params = new Proxy(new URLSearchParams(window.location.search), { + get: (searchParams, prop) => searchParams.get(prop), + }); + if (!params.sort) { + // else, if there is a data-default-sort attribute on a column, pre-sort the table on that + const presort_col = $(header_row).children("[data-default-sort]:first"); + if (presort_col) { + const order = presort_col.attr("data-default-sort"); + if (order === "asc" || order === "desc") { + $.each(list_instance, (i, e) => { + e.sort(presort_col.attr("data-sort"), { order: order, sortFunction: text_sort }); + }); + } } } }); diff --git a/ietf/templates/liaisons/liaison_desc.html b/ietf/templates/liaisons/liaison_desc.html index 1286198e2..8fb9fbf04 100644 --- a/ietf/templates/liaisons/liaison_desc.html +++ b/ietf/templates/liaisons/liaison_desc.html @@ -1,4 +1,6 @@