Fix template sort field detection

Remove get_absolute_url fallback to object.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2019-04-24 01:25:46 -04:00
parent 9a706ac09f
commit 120896001f
2 changed files with 3 additions and 3 deletions

View File

@@ -69,7 +69,7 @@
{% navigation_get_source_columns source=object only_identifier=True as source_column %}
{% navigation_source_column_resolve column=source_column as column_value %}
{% if source_column.is_absolute_url %}
<a href="{{ column_value.get_absolute_url|default:object.get_absolute_url }}">{{ column_value }}</a>
<a href="{{ column_value.get_absolute_url }}">{{ column_value }}</a>
{% else %}
{{ column_value }}
{% endif %}

View File

@@ -59,7 +59,7 @@
<th>
{% if source_column.is_sortable %}
<a href="{% navigation_get_sort_field_querystring column=source_column %}">{{ source_column.label }}
{% if navigation_source_column.get_sort_field == sort_field %}
{% if source_column.get_sort_field == sort_field %}
{% if icon_sort %}{{ icon_sort.render }}{% endif %}
{% endif %}
</a>
@@ -113,7 +113,7 @@
{% if column_value %}
<td>
{% if source_column.is_absolute_url %}
<a href="{{ column_value.get_absolute_url|default:object.get_absolute_url }}">{{ column_value }}</a>
<a href="{{ column_value.get_absolute_url }}">{{ column_value }}</a>
{% else %}
{{ column_value }}
{% endif %}