# spicedb


11/18/2022, 1:13 AM
say you wanted to delete a relationship and recreate the relationship with an id that could be the same as the id that you are deleting in the same WriteRelationship call how do you prevent this error:
rpc error: code = InvalidArgument desc = found duplicate update operation for relationship
? I was told you could use Precondition but I'm not sure how. How could I let spicedb know, if the relationship exists, to either go ahead with the delete and recreate the relationship or to disregard both the delete and touch and leave the relationship as is?