Commit 90536e49 authored by Pierre Dittgen's avatar Pierre Dittgen

Tags: use version sorting

parent 6e476a35
......@@ -21,7 +21,7 @@ from commonmark import commonmark
from flask import abort, make_response, redirect, render_template, request, url_for
from validata_core import messages
from opendataschema import GitSchemaReference
from opendataschema import GitSchemaReference, by_semver
from . import app, config, schema_catalog_map, tableschema_from_url
from .ui_util import flash_error, flash_warning
......@@ -81,7 +81,7 @@ class SchemaInstance:
'schema_name': self.schema_and_section_name,
'schema_ref': schema_ref.name
})))
self.tags = list(schema_reference.iter_tags())
self.tags = sorted(schema_reference.iter_tags(), key=by_semver, reverse=True)
tag_names = [tag.name for tag in self.tags]
self.branches = [branch for branch in schema_reference.iter_branches()
if branch.name not in tag_names]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment