Skip to content

Commit

Permalink
fix: file not synced after switch sync method
Browse files Browse the repository at this point in the history
  • Loading branch information
CurryYangxx committed Sep 2, 2024
1 parent d4bfeb3 commit 4442a80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/insomnia/src/ui/routes/git-actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ export const canPushLoader: LoaderFunction = async ({ params }): Promise<GitCanP
try {
canPush = await GitVCS.canPush(gitRepository.credentials);
// update workspace meta with git sync data, use for show unpushed changes on collection card
models.workspaceMeta.update(workspaceMeta, {
models.workspaceMeta.updateByParentId(workspaceId, {
hasUnpushedChanges: canPush,
});
} catch (err) { }
Expand Down
2 changes: 1 addition & 1 deletion packages/insomnia/src/ui/routes/request.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const loader: LoaderFunction = async ({ params }): Promise<RequestLoaderD
const activeWorkspaceMeta = await models.workspaceMeta.getByParentId(workspaceId);
invariant(activeWorkspaceMeta, 'Active workspace meta not found');
// NOTE: loaders shouldnt mutate data, this should be moved somewhere else
await models.workspaceMeta.update(activeWorkspaceMeta, { activeRequestId: requestId });
await models.workspaceMeta.updateByParentId(workspaceId, { activeRequestId: requestId });
if (isGrpcRequestId(requestId)) {
return {
activeRequest,
Expand Down

0 comments on commit 4442a80

Please sign in to comment.