Skip to content

Commit

Permalink
change save validation to respect patch
Browse files Browse the repository at this point in the history
  • Loading branch information
InnocentBug committed Jul 20, 2023
1 parent 0661e8a commit c2b38cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cript/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,6 @@ def _internal_save(self, node, save_values: Optional[_InternalSaveValues] = None
if save_values is None:
save_values = _InternalSaveValues()

node.validate()
# saves all the local files to cloud storage right before saving the Project node
# Ensure that all file nodes have uploaded there payload before actual save.
for file_node in node.find_children({"node": ["File"]}):
Expand All @@ -581,6 +580,7 @@ def _internal_save(self, node, save_values: Optional[_InternalSaveValues] = None
if not patch_request and force_patch:
patch_request = True
force_patch = False
node.validate(is_patch=patch_request)

# If all that is left is a UUID, we don't need to save it, we can just exit the loop.
if patch_request and len(json.loads(json_data)) == 1:
Expand Down

0 comments on commit c2b38cb

Please sign in to comment.