Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alessandro/web 2233 onboarding project create fails #3592

Merged
merged 2 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/server/modules/core/repositories/commits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ export const getBatchedBranchCommitsFactory =
...BranchCommits.cols,
StreamCommits.col.streamId
])
.innerJoin(
StreamCommits.name,
StreamCommits.col.commitId,
BranchCommits.col.commitId
)
.whereIn(BranchCommits.col.branchId, branchIds)
.orderBy(BranchCommits.col.branchId)

Expand Down
15 changes: 6 additions & 9 deletions packages/server/modules/core/services/streams/clone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -521,19 +521,16 @@ export const cloneStreamFactory =
const { newStream } = coreCloneResult
// Clone comments
await cloneStreamCommentsFactory(deps)(state, coreCloneResult)
// Create activity item
await deps.addStreamClonedActivity(
{
sourceStreamId,
newStream,
clonerId: userId
},
{ trx: state.trx }
)

// Commit transaction
await state.trx.commit()

// Create activity item
await deps.addStreamClonedActivity({
sourceStreamId,
newStream,
clonerId: userId
})
return coreCloneResult.newStream
} catch (e) {
await state.trx.rollback()
Expand Down