Python Eve patch_internal set etag
<p>I am trying to make an <code>on_insert</code> event hook for a document from schema A, call eve's <code>patch_internal</code> to a document from schema B. </p>

<p>Since the request triggering the event hook is a <code>POST</code> for A, there's no <code>If-Match</code> header with the necessary B <code>etag</code> in flask request.</p>

<p>I've tried to set the value on the flask request before the <code>patch_internal</code> with <code>flask.request.if_match</code>, but seems it is not possible since it is a frozenset.</p>

<p>How can I set the <code>etag</code> for the <code>patch_internal</code> call?</p>

<p>In summary, the creation of a document updates other document with different schema. Can I do this?</p>

<p>Thanks.</p>

<p>You can set <code>concurrency_check=False</code> in your call to <code>patch_internal</code></p>

<pre><code>from eve.methods.patch import patch_internal

with app.request_context():
   payload = {"value_key": "new value"}
   lookup = {"_id": "12ababa12..."}
   patch_internal("res_name", payload, **lookup, concurrency_check=False)
</code></pre>

python flask eve