mirror of
https://github.com/sartography/spiff-arena.git
synced 2025-01-11 18:14:20 +00:00
set the returned file as the new file when saving a process model file so we get the new contents hash w/ burnettk
This commit is contained in:
parent
20ee46899d
commit
998de63eca
@ -530,6 +530,8 @@ def _create_or_update_process_model_file(
|
|||||||
file_contents = SpecFileService.get_data(process_model, file.name)
|
file_contents = SpecFileService.get_data(process_model, file.name)
|
||||||
file.file_contents = file_contents
|
file.file_contents = file_contents
|
||||||
file.process_model_id = process_model.id
|
file.process_model_id = process_model.id
|
||||||
|
file_contents_hash = sha256(file_contents).hexdigest()
|
||||||
|
file.file_contents_hash = file_contents_hash
|
||||||
_commit_and_push_to_git(f"{message_for_git_commit} {process_model_identifier}/{file.name}")
|
_commit_and_push_to_git(f"{message_for_git_commit} {process_model_identifier}/{file.name}")
|
||||||
|
|
||||||
return make_response(jsonify(file), http_status_to_return)
|
return make_response(jsonify(file), http_status_to_return)
|
||||||
|
@ -206,8 +206,11 @@ export default function ProcessModelEditDiagram() {
|
|||||||
setProcessModelFileInvalidText('');
|
setProcessModelFileInvalidText('');
|
||||||
};
|
};
|
||||||
|
|
||||||
const navigateToProcessModelFile = (_result: any) => {
|
const navigateToProcessModelFile = (file: ProcessFile) => {
|
||||||
setDisplaySaveFileMessage(true);
|
setDisplaySaveFileMessage(true);
|
||||||
|
if (file.file_contents_hash) {
|
||||||
|
setProcessModelFile(file);
|
||||||
|
}
|
||||||
if (!params.file_name) {
|
if (!params.file_name) {
|
||||||
const fileNameWithExtension = `${newFileName}.${searchParams.get(
|
const fileNameWithExtension = `${newFileName}.${searchParams.get(
|
||||||
'file_type'
|
'file_type'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user