Commit 6aee3dc8 authored by Christophe Benz's avatar Christophe Benz

Follow opendataschema updates

parent 7af8c493
......@@ -5,7 +5,7 @@ ezodf==0.3.2
Flask==1.0.2
Flask-Matomo==1.2.0
lxml==4.2.5
opendataschema==0.5.0
opendataschema==0.5.2
python-dotenv==0.10.1
requests==2.22.0
toml==0.10.0
......
......@@ -64,7 +64,7 @@ setup(
'tabulator',
'opendataschema >= 0.5.0, < 0.6',
'opendataschema >= 0.5.2, < 0.6',
'validata_core >= 0.3.0, < 0.4',
],
......
......@@ -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, by_semver
from opendataschema import GitSchemaReference, by_commit_date
from . import app, config, schema_catalog_registry, tableschema_from_url
from .ui_util import flash_error, flash_warning
......@@ -80,7 +80,7 @@ class SchemaInstance:
abort(400, "Schéma '{}' non trouvé dans le catalogue de la section '{}'".format(self.name, self.section_name))
if isinstance(schema_reference, GitSchemaReference):
self.tags = sorted(schema_reference.iter_tags(), key=by_semver, reverse=True)
self.tags = sorted(schema_reference.iter_tags(), key=by_commit_date, reverse=True)
if self.ref is None:
schema_ref = self.tags[0] if self.tags else schema_reference.get_default_branch()
abort(redirect(compute_validation_form_url({
......
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