From 73e0fe33a53f5da87ba1913f0f48ea0df324ad8d Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 19 Jul 2019 17:18:54 +0300 Subject: Fix assertion failure when current version is closed and new base model version is greater than latest changeset --- odb/relational/changelog.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/odb/relational/changelog.cxx b/odb/relational/changelog.cxx index 10db6c9..0e6d580 100644 --- a/odb/relational/changelog.cxx +++ b/odb/relational/changelog.cxx @@ -772,7 +772,14 @@ namespace relational if (l.contains_changeset_empty ()) { model& m (l.model ()); - assert (o.version () == m.version ()); + + // The changelog model version may also be equal to the new model + // version if the new base model version is greater than the + // latest changeset. + // + assert (m.version () == o.version () || + m.version () == n.version ()); + l.new_edge (r, m); } else -- cgit v1.1