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

Commit

Permalink
fix: _get_latest_version() of VersionSQLRepo should return ModelNotFo…
Browse files Browse the repository at this point in the history
…und if not found any version
  • Loading branch information
trgiangdo committed Nov 10, 2023
1 parent 028d97f commit a8e164b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/taipy/core/_version/_version_sql_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def _set_latest_version(self, version_number):
def _get_latest_version(self):
if latest := self.db.query(self.model_type).filter_by(is_latest=True).first():
return latest.id
return ""
raise ModelNotFound(self.model_type, "")

def _set_development_version(self, version_number):
if old_development := self.db.query(self.model_type).filter_by(is_development=True).first():
Expand Down

0 comments on commit a8e164b

Please sign in to comment.