Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

Commit

Permalink
fixed migration version for sql
Browse files Browse the repository at this point in the history
  • Loading branch information
Toan Quach authored and Toan Quach committed Nov 6, 2023
1 parent 54df259 commit 186b455
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/taipy/core/_version/_cli/_version_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from taipy.logger._taipy_logger import _TaipyLogger

from ...data._data_manager_factory import _DataManagerFactory
from ...exceptions.exceptions import VersionIsNotProductionVersion
from ...exceptions.exceptions import ModelNotFound, VersionIsNotProductionVersion
from ...job._job_manager_factory import _JobManagerFactory
from ...scenario._scenario_manager_factory import _ScenarioManagerFactory
from ...sequence._sequence_manager_factory import _SequenceManagerFactory
Expand Down Expand Up @@ -199,8 +199,10 @@ def __rename_version(cls, old_version: str, new_version: str):
_version_manager._delete_production_version(old_version)
except VersionIsNotProductionVersion:
pass
version_entity.id = new_version
_version_manager._set(version_entity)

if not _version_manager._get(new_version):
version_entity.id = new_version
_version_manager._set(version_entity)

@classmethod
def __compare_version_config(cls, version_1: str, version_2: str):
Expand Down

0 comments on commit 186b455

Please sign in to comment.