mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-10 09:53:48 +00:00
feat: abort partial load if there is a version missmatch (#1724)
* abort partial load on version missmatch * reword comment Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com> --------- Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
This commit is contained in:
committed by
Carlos Valente
parent
022a58e142
commit
97a0e17192
@@ -61,6 +61,10 @@ export default function ProjectMergeForm({ onClose, fileName }: ProjectMergeFrom
|
||||
|
||||
// make patch object
|
||||
const { data } = await getDb(fileName);
|
||||
if (!data.settings.version.startsWith('4.')) {
|
||||
setError('The project you are attempting to merge is from an older version and it need to be migrated first');
|
||||
return;
|
||||
}
|
||||
const patch = await makeProjectPatch(data, values);
|
||||
|
||||
// request patch
|
||||
|
||||
Reference in New Issue
Block a user