Skip to content

Commit f9f39a5

Browse files
committed
fix: Allow an explicit MustExist precondition for update
Fixes #11361
1 parent 810eb73 commit f9f39a5

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

apis/Google.Cloud.Firestore/Google.Cloud.Firestore/WriteBatch.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2017, Google Inc. All rights reserved.
1+
// Copyright 2017, Google Inc. All rights reserved.
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -121,7 +121,6 @@ public WriteBatch Update(DocumentReference documentReference, IDictionary<FieldP
121121
GaxPreconditions.CheckNotNull(documentReference, nameof(documentReference));
122122
GaxPreconditions.CheckNotNull(updates, nameof(updates));
123123
GaxPreconditions.CheckArgument(updates.Count != 0, nameof(updates), "Empty set of updates specified");
124-
GaxPreconditions.CheckArgument(precondition?.Exists != true, nameof(precondition), "Cannot specify a must-exist precondition for update");
125124

126125
var serializedUpdates = updates.ToDictionary(pair => pair.Key, pair => ValueSerializer.Serialize(documentReference.Database.SerializationContext, pair.Value));
127126
var expanded = ExpandObject(serializedUpdates);

0 commit comments

Comments
 (0)