--- a/src/pyams_default_theme/features/search/portlet/templates/search-panels.pt Tue Jan 12 13:39:51 2021 +0100
+++ b/src/pyams_default_theme/features/search/portlet/templates/search-panels.pt Wed Jan 13 14:14:02 2021 +0100
@@ -16,7 +16,7 @@
condition="collection">
<input type="hidden" name="collection" value="${collection}" />
</tal:var>
- <input type="hidden" name="order_by" value="${request.params.get('order_by') or context.order_by}" />
+ <input type="hidden" name="order_by" value="${request.params.get('order_by') or getattr(context, 'order_by', '')}" />
<input type="hidden" name="start" value="${start}" />
<input type="hidden" name="length" value="${length}" />
</form>
--- a/src/pyams_default_theme/features/search/portlet/templates/search-results.pt Tue Jan 12 13:39:51 2021 +0100
+++ b/src/pyams_default_theme/features/search/portlet/templates/search-results.pt Wed Jan 13 14:14:02 2021 +0100
@@ -16,7 +16,7 @@
condition="collection">
<input type="hidden" name="collection" value="${collection}" />
</tal:var>
- <input type="hidden" name="order_by" value="${request.params.get('order_by') or context.order_by}" />
+ <input type="hidden" name="order_by" value="${request.params.get('order_by') or getattr(context, 'order_by', '')}" />
<input type="hidden" name="start" value="${start}" />
<input type="hidden" name="length" value="${length}" />
</form>