diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2019-07-19 17:18:54 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2019-07-23 12:33:23 +0300 |
commit | 73e0fe33a53f5da87ba1913f0f48ea0df324ad8d (patch) | |
tree | 847ff68eb94a3d5b99f05fbcec2d50b506bc34f4 | |
parent | 39ece65fd176084e7dc1a356dcbcf0f29c3824d0 (diff) |
Fix assertion failure when current version is closed and new base model version is greater than latest changeset
-rw-r--r-- | odb/relational/changelog.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
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<alters> (r, m); } else |