Skip to content

Commit

Permalink
fix: remove unnecessary transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
the-good-boy committed Aug 22, 2023
1 parent a6f97b1 commit 261ac7b
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions test/test-helpers/create-entities.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,22 +165,18 @@ export function createEditor(editorId, privs = 1) {
});
}

export function createRelationshipType() {
return orm.bookshelf.knex.transaction(async (transacting) => {
const relationshipType = await new RelationshipType(relationshipTypeData)
.save(null, {method: 'insert', transacting});
export async function createRelationshipType() {
const relationshipType = await new RelationshipType(relationshipTypeData)
.save(null, {method: 'insert'});

return relationshipType.id;
});
return relationshipType.id;
}

export function createIdentifierType() {
return orm.bookshelf.knex.transaction(async (transacting) => {
const identifierType = await new IdentifierType(identifierTypeData)
.save(null, {method: 'insert', transacting});
export async function createIdentifierType() {
const identifierType = await new IdentifierType(identifierTypeData)
.save(null, {method: 'insert'});

return identifierType.id;
});
return identifierType.id;
}

async function createAliasAndAliasSet() {
Expand Down

0 comments on commit 261ac7b

Please sign in to comment.