Skip to content

Commit

Permalink
Remove extra subdef.id check
Browse files Browse the repository at this point in the history
  • Loading branch information
ktuite committed Oct 4, 2023
1 parent 7f59e5d commit 8c40f46
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/model/query/entities.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ const createNew = (dataset, partial, subDef, sourceId, userAgentIn) => ({ one, c
let userAgent;

// Set creatorId and userAgent from submission def if it exists
if (subDef != null && subDef.id != null)
if (subDef != null) {
({ submitterId: creatorId, userAgent } = subDef);
else {
} else {
creatorId = context.auth.actor.map((actor) => actor.id).orNull();
userAgent = blankStringToNull(userAgentIn);
}
Expand Down Expand Up @@ -94,9 +94,9 @@ const createVersion = (dataset, partial, subDef, version, sourceId, userAgentIn
let userAgent;

// Set creatorId and userAgent from submission def if it exists
if (subDef != null && subDef.id != null)
if (subDef != null) {
({ submitterId: creatorId, userAgent } = subDef);
else {
} else {
creatorId = context.auth.actor.map((actor) => actor.id).orNull();
userAgent = blankStringToNull(userAgentIn);
}
Expand Down

0 comments on commit 8c40f46

Please sign in to comment.