Skip to content

Commit

Permalink
Merge pull request #71 from bartelink/warns
Browse files Browse the repository at this point in the history
Fix warning
  • Loading branch information
samritchie authored Nov 29, 2023
2 parents fb6b6e1 + 09e7a03 commit 714745c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/FSharp.AWS.DynamoDB/Expression/UpdateExpr.fs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ let extractUpdateOps (exprs : IntermediateUpdateExprs) =
exprs.Assignments
|> Seq.map (fun (rp,e) -> extractUpdateOp rp e)
|> Seq.append exprs.UpdateOps
|> Seq.filter (function Skip _ -> false | _ -> true)
|> Seq.filter (function Skip -> false | _ -> true)
|> Seq.map (fun uop ->
if uop.Attribute.IsHashKey && uop.Attribute.IsPrimaryKey then invalidArg "expr" "update expression cannot update hash key."
if uop.Attribute.IsRangeKey && uop.Attribute.IsPrimaryKey then invalidArg "expr" "update expression cannot update range key."
Expand Down Expand Up @@ -373,7 +373,7 @@ let applyParams (uops : UpdateOperations) (inputValues : obj[]) =

let applyUpdateOp uop =
match uop with
| Skip _ -> uop
| Skip -> uop
| Remove(attr) -> Remove (applyAttr attr)
| Set(attr, uv) -> UpdateOperation.ESet (applyAttr attr) (applyUpdateValue uv)
| Add(attr, op) -> UpdateOperation.EAdd (applyAttr attr) (applyOperand op)
Expand Down

0 comments on commit 714745c

Please sign in to comment.