<div dir="ltr">Hi, I had this error while running "updatelayers" command (only if there are layers from remote-store in geoserver)<div>And some users reported to have same error while uploading or deleting layers.</div><div><br></div><div>Here´s the traceback:</div><div><br></div><div><br></div><div><div id="gmail-summary" style="padding:10px 20px;margin:0px;border-bottom:1px solid rgb(221,221,221);background:rgb(255,255,204);color:rgb(0,0,0);font-family:sans-serif"><h1 style="padding:0px;margin:0px;font-weight:normal">TransactionManagementError at /admin/layers/layer/</h1><pre class="exception_value" style="padding:0px;margin-top:10px;margin-bottom:10px;font-size:1.5em;white-space:pre-wrap;font-family:sans-serif;color:rgb(102,102,102)">An error occurred in the current transaction. You can't execute queries until the end of the 'atomic' block.</pre><table class="gmail-meta" style="padding:0px;margin:0px;border:none;border-collapse:collapse;width:1649px;background:transparent"><tbody style="padding:0px;margin:0px"><tr style="padding:0px;margin:0px"><th style="padding:2px 0.5em 2px 3px;margin:0px;vertical-align:top;width:12em;text-align:right;color:rgb(102,102,102)">Request Method:</th><td style="padding:2px 3px;vertical-align:top">POST</td></tr><tr style="padding:0px;margin:0px"><th style="padding:2px 0.5em 2px 3px;margin:0px;vertical-align:top;width:12em;text-align:right;color:rgb(102,102,102)">Request URL:</th><td style="padding:2px 3px;vertical-align:top"><a href="http://192.168.0.56/admin/layers/layer/">http://192.168.0.56/admin/layers/layer/</a></td></tr><tr style="padding:0px;margin:0px"><th style="padding:2px 0.5em 2px 3px;margin:0px;vertical-align:top;width:12em;text-align:right;color:rgb(102,102,102)">Django Version:</th><td style="padding:2px 3px;vertical-align:top">1.8.7</td></tr><tr style="padding:0px;margin:0px"><th style="padding:2px 0.5em 2px 3px;margin:0px;vertical-align:top;width:12em;text-align:right;color:rgb(102,102,102)">Exception Type:</th><td style="padding:2px 3px;vertical-align:top">TransactionManagementError</td></tr><tr style="padding:0px;margin:0px"><th style="padding:2px 0.5em 2px 3px;margin:0px;vertical-align:top;width:12em;text-align:right;color:rgb(102,102,102)">Exception Value:</th><td style="padding:2px 3px;vertical-align:top"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:10.5625px;white-space:pre-wrap">An error occurred in the current transaction. You can't execute queries until the end of the 'atomic' block.</pre></td></tr><tr style="padding:0px;margin:0px"><th style="padding:2px 0.5em 2px 3px;margin:0px;vertical-align:top;width:12em;text-align:right;color:rgb(102,102,102)">Exception Location:</th><td style="padding:2px 3px;vertical-align:top">/usr/local/lib/python2.7/dist-packages/django/db/backends/base/base.py in validate_no_broken_transaction, line 327</td></tr><tr style="padding:0px;margin:0px"><th style="padding:2px 0.5em 2px 3px;margin:0px;vertical-align:top;width:12em;text-align:right;color:rgb(102,102,102)">Python Executable:</th><td style="padding:2px 3px;vertical-align:top">/usr/bin/python</td></tr><tr style="padding:0px;margin:0px"><th style="padding:2px 0.5em 2px 3px;margin:0px;vertical-align:top;width:12em;text-align:right;color:rgb(102,102,102)">Python Version:</th><td style="padding:2px 3px;vertical-align:top">2.7.12</td></tr><tr style="padding:0px;margin:0px"><th style="padding:2px 0.5em 2px 3px;margin:0px;vertical-align:top;width:12em;text-align:right;color:rgb(102,102,102)">Python Path:</th><td style="padding:2px 3px;vertical-align:top"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:10.5625px;white-space:pre-wrap">['/home/geonode/my_geonode',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-x86_64-linux-gnu',
'/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages/PILcompat',
'/var/www']</pre></td></tr><tr style="padding:0px;margin:0px"><th style="padding:2px 0.5em 2px 3px;margin:0px;vertical-align:top;width:12em;text-align:right;color:rgb(102,102,102)">Server time:</th><td style="padding:2px 3px;vertical-align:top">Mié, 2 Ago 2017 14:25:16 -0500</td></tr></tbody></table></div><div id="gmail-traceback" style="padding:10px 20px;margin:0px;border-bottom:1px solid rgb(221,221,221);background:rgb(238,238,238);color:rgb(0,0,0);font-family:sans-serif"><h2 style="padding:0px;margin:0px 0px 0.8em">Traceback <span class="gmail-commands" style="padding:0px;margin:0px;font-size:0.7em;color:rgb(102,102,102);font-weight:normal"><a href="http://192.168.0.56/admin/layers/layer/#" style="padding:0px;margin:0px;color:rgb(94,86,148)">Switch to copy-and-paste view</a></span></h2><div id="gmail-browserTraceback" style="padding:0px;margin:0px"><ul class="gmail-traceback" style="padding:0px;margin:0px;list-style-type:none;color:rgb(34,34,34)"><li class="gmail-frame gmail-django" style="padding:0px 0px 1em;margin:0px;color:rgb(102,102,102)"><code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py</code> in <code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">get_response</code><div class="gmail-context" id="gmail-c140028390406480" style="padding:10px 0px;margin:0px;overflow:hidden"><ol start="132" class="gmail-context-line" style="padding:0px 0px 0px 30px;margin:0px 10px;list-style-position:inside"><li style="padding:0px;margin:0px;font-family:monospace;white-space:pre;color:rgb(80,80,80);background-color:rgb(223,223,223)"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;display:inline"> response = wrapped_callback(request, *callback_args, **callback_kwargs)</pre> <span style="padding:0px;margin:0px">...</span></li></ol></div><div class="gmail-commands" style="padding:0px;margin:0px 0px 0px 40px"><a href="http://192.168.0.56/admin/layers/layer/#" style="padding:0px;margin:0px;color:rgb(85,85,85);text-decoration-line:none"><span style="padding:0px;margin:0px">▶</span> Local vars</a></div></li><li class="gmail-frame gmail-django" style="padding:0px 0px 1em;margin:0px;color:rgb(102,102,102)"><code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py</code> in <code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">wrapper</code><div class="gmail-context" id="gmail-c140028390405184" style="padding:10px 0px;margin:0px;overflow:hidden"><ol start="618" class="gmail-context-line" style="padding:0px 0px 0px 30px;margin:0px 10px;list-style-position:inside"><li style="padding:0px;margin:0px;font-family:monospace;white-space:pre;color:rgb(80,80,80);background-color:rgb(223,223,223)"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;display:inline"> return self.admin_site.admin_view(view)(*args, **kwargs)</pre> <span style="padding:0px;margin:0px">...</span></li></ol></div><div class="gmail-commands" style="padding:0px;margin:0px 0px 0px 40px"><a href="http://192.168.0.56/admin/layers/layer/#" style="padding:0px;margin:0px;color:rgb(85,85,85);text-decoration-line:none"><span style="padding:0px;margin:0px">▶</span> Local vars</a></div></li><li class="gmail-frame gmail-django" style="padding:0px 0px 1em;margin:0px;color:rgb(102,102,102)"><code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py</code> in <code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">_wrapped_view</code><div class="gmail-context" id="gmail-c140028389022320" style="padding:10px 0px;margin:0px;overflow:hidden"><ol start="110" class="gmail-context-line" style="padding:0px 0px 0px 30px;margin:0px 10px;list-style-position:inside"><li style="padding:0px;margin:0px;font-family:monospace;white-space:pre;color:rgb(80,80,80);background-color:rgb(223,223,223)"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;display:inline"> response = view_func(request, *args, **kwargs)</pre> <span style="padding:0px;margin:0px">...</span></li></ol></div><div class="gmail-commands" style="padding:0px;margin:0px 0px 0px 40px"><a href="http://192.168.0.56/admin/layers/layer/#" style="padding:0px;margin:0px;color:rgb(85,85,85);text-decoration-line:none"><span style="padding:0px;margin:0px">▶</span> Local vars</a></div></li><li class="gmail-frame gmail-django" style="padding:0px 0px 1em;margin:0px;color:rgb(102,102,102)"><code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">/usr/local/lib/python2.7/dist-packages/django/views/decorators/cache.py</code> in <code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">_wrapped_view_func</code><div class="gmail-context" id="gmail-c140028387663384" style="padding:10px 0px;margin:0px;overflow:hidden"><ol start="57" class="gmail-context-line" style="padding:0px 0px 0px 30px;margin:0px 10px;list-style-position:inside"><li style="padding:0px;margin:0px;font-family:monospace;white-space:pre;color:rgb(80,80,80);background-color:rgb(223,223,223)"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;display:inline"> response = view_func(request, *args, **kwargs)</pre> <span style="padding:0px;margin:0px">...</span></li></ol></div><div class="gmail-commands" style="padding:0px;margin:0px 0px 0px 40px"><a href="http://192.168.0.56/admin/layers/layer/#" style="padding:0px;margin:0px;color:rgb(85,85,85);text-decoration-line:none"><span style="padding:0px;margin:0px">▶</span> Local vars</a></div></li><li class="gmail-frame gmail-django" style="padding:0px 0px 1em;margin:0px;color:rgb(102,102,102)"><code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">/usr/local/lib/python2.7/dist-packages/django/contrib/admin/sites.py</code> in <code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">inner</code><div class="gmail-context" id="gmail-c140028387660864" style="padding:10px 0px;margin:0px;overflow:hidden"><ol start="233" class="gmail-context-line" style="padding:0px 0px 0px 30px;margin:0px 10px;list-style-position:inside"><li style="padding:0px;margin:0px;font-family:monospace;white-space:pre;color:rgb(80,80,80);background-color:rgb(223,223,223)"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;display:inline"> return view(request, *args, **kwargs)</pre> <span style="padding:0px;margin:0px">...</span></li></ol></div><div class="gmail-commands" style="padding:0px;margin:0px 0px 0px 40px"><a href="http://192.168.0.56/admin/layers/layer/#" style="padding:0px;margin:0px;color:rgb(85,85,85);text-decoration-line:none"><span style="padding:0px;margin:0px">▶</span> Local vars</a></div></li><li class="gmail-frame gmail-django" style="padding:0px 0px 1em;margin:0px;color:rgb(102,102,102)"><code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py</code> in <code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">_wrapper</code><div class="gmail-context" id="gmail-c140028381111792" style="padding:10px 0px;margin:0px;overflow:hidden"><ol start="34" class="gmail-context-line" style="padding:0px 0px 0px 30px;margin:0px 10px;list-style-position:inside"><li style="padding:0px;margin:0px;font-family:monospace;white-space:pre;color:rgb(80,80,80);background-color:rgb(223,223,223)"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;display:inline"> return bound_func(*args, **kwargs)</pre> <span style="padding:0px;margin:0px">...</span></li></ol></div><div class="gmail-commands" style="padding:0px;margin:0px 0px 0px 40px"><a href="http://192.168.0.56/admin/layers/layer/#" style="padding:0px;margin:0px;color:rgb(85,85,85);text-decoration-line:none"><span style="padding:0px;margin:0px">▶</span> Local vars</a></div></li><li class="gmail-frame gmail-django" style="padding:0px 0px 1em;margin:0px;color:rgb(102,102,102)"><code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py</code> in <code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">_wrapped_view</code><div class="gmail-context" id="gmail-c140028390441256" style="padding:10px 0px;margin:0px;overflow:hidden"><ol start="110" class="gmail-context-line" style="padding:0px 0px 0px 30px;margin:0px 10px;list-style-position:inside"><li style="padding:0px;margin:0px;font-family:monospace;white-space:pre;color:rgb(80,80,80);background-color:rgb(223,223,223)"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;display:inline"> response = view_func(request, *args, **kwargs)</pre> <span style="padding:0px;margin:0px">...</span></li></ol></div><div class="gmail-commands" style="padding:0px;margin:0px 0px 0px 40px"><a href="http://192.168.0.56/admin/layers/layer/#" style="padding:0px;margin:0px;color:rgb(85,85,85);text-decoration-line:none"><span style="padding:0px;margin:0px">▶</span> Local vars</a></div></li><li class="gmail-frame gmail-django" style="padding:0px 0px 1em;margin:0px;color:rgb(102,102,102)"><code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py</code> in <code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">bound_func</code><div class="gmail-context" id="gmail-c140028385729784" style="padding:10px 0px;margin:0px;overflow:hidden"><ol start="30" class="gmail-context-line" style="padding:0px 0px 0px 30px;margin:0px 10px;list-style-position:inside"><li style="padding:0px;margin:0px;font-family:monospace;white-space:pre;color:rgb(80,80,80);background-color:rgb(223,223,223)"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;display:inline"> return func.__get__(self, type(self))(*args2, **kwargs2)</pre> <span style="padding:0px;margin:0px">...</span></li></ol></div><div class="gmail-commands" style="padding:0px;margin:0px 0px 0px 40px"><a href="http://192.168.0.56/admin/layers/layer/#" style="padding:0px;margin:0px;color:rgb(85,85,85);text-decoration-line:none"><span style="padding:0px;margin:0px">▶</span> Local vars</a></div></li><li class="gmail-frame gmail-django" style="padding:0px 0px 1em;margin:0px;color:rgb(102,102,102)"><code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py</code> in <code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">changelist_view</code><div class="gmail-context" id="gmail-c140028385728560" style="padding:10px 0px;margin:0px;overflow:hidden"><ol start="1592" class="gmail-context-line" style="padding:0px 0px 0px 30px;margin:0px 10px;list-style-position:inside"><li style="padding:0px;margin:0px;font-family:monospace;white-space:pre;color:rgb(80,80,80);background-color:rgb(223,223,223)"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;display:inline"> response = self.response_action(request, queryset=cl.get_queryset(request))</pre> <span style="padding:0px;margin:0px">...</span></li></ol></div><div class="gmail-commands" style="padding:0px;margin:0px 0px 0px 40px"><a href="http://192.168.0.56/admin/layers/layer/#" style="padding:0px;margin:0px;color:rgb(85,85,85);text-decoration-line:none"><span style="padding:0px;margin:0px">▶</span> Local vars</a></div></li><li class="gmail-frame gmail-django" style="padding:0px 0px 1em;margin:0px;color:rgb(102,102,102)"><code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py</code> in <code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">response_action</code><div class="gmail-context" id="gmail-c140028390404176" style="padding:10px 0px;margin:0px;overflow:hidden"><ol start="1335" class="gmail-context-line" style="padding:0px 0px 0px 30px;margin:0px 10px;list-style-position:inside"><li style="padding:0px;margin:0px;font-family:monospace;white-space:pre;color:rgb(80,80,80);background-color:rgb(223,223,223)"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;display:inline"> response = func(self, request, queryset)</pre> <span style="padding:0px;margin:0px">...</span></li></ol></div><div class="gmail-commands" style="padding:0px;margin:0px 0px 0px 40px"><a href="http://192.168.0.56/admin/layers/layer/#" style="padding:0px;margin:0px;color:rgb(85,85,85);text-decoration-line:none"><span style="padding:0px;margin:0px">▶</span> Local vars</a></div></li><li class="gmail-frame gmail-django" style="padding:0px 0px 1em;margin:0px;color:rgb(102,102,102)"><code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">/usr/local/lib/python2.7/dist-packages/django/contrib/admin/actions.py</code> in <code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">delete_selected</code><div class="gmail-context" id="gmail-c140028390404536" style="padding:10px 0px;margin:0px;overflow:hidden"><ol start="49" class="gmail-context-line" style="padding:0px 0px 0px 30px;margin:0px 10px;list-style-position:inside"><li style="padding:0px;margin:0px;font-family:monospace;white-space:pre;color:rgb(80,80,80);background-color:rgb(223,223,223)"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;display:inline"> queryset.delete()</pre> <span style="padding:0px;margin:0px">...</span></li></ol></div><div class="gmail-commands" style="padding:0px;margin:0px 0px 0px 40px"><a href="http://192.168.0.56/admin/layers/layer/#" style="padding:0px;margin:0px;color:rgb(85,85,85);text-decoration-line:none"><span style="padding:0px;margin:0px">▶</span> Local vars</a></div></li><li class="gmail-frame gmail-django" style="padding:0px 0px 1em;margin:0px;color:rgb(102,102,102)"><code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">/usr/local/lib/python2.7/dist-packages/django/db/models/query.py</code> in <code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">delete</code><div class="gmail-context" id="gmail-c140028387884280" style="padding:10px 0px;margin:0px;overflow:hidden"><ol start="537" class="gmail-context-line" style="padding:0px 0px 0px 30px;margin:0px 10px;list-style-position:inside"><li style="padding:0px;margin:0px;font-family:monospace;white-space:pre;color:rgb(80,80,80);background-color:rgb(223,223,223)"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;display:inline"> collector.delete()</pre> <span style="padding:0px;margin:0px">...</span></li></ol></div><div class="gmail-commands" style="padding:0px;margin:0px 0px 0px 40px"><a href="http://192.168.0.56/admin/layers/layer/#" style="padding:0px;margin:0px;color:rgb(85,85,85);text-decoration-line:none"><span style="padding:0px;margin:0px">▶</span> Local vars</a></div></li><li class="gmail-frame gmail-django" style="padding:0px 0px 1em;margin:0px;color:rgb(102,102,102)"><code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">/usr/local/lib/python2.7/dist-packages/django/db/models/deletion.py</code> in <code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">delete</code><div class="gmail-context" id="gmail-c140028379902824" style="padding:10px 0px;margin:0px;overflow:hidden"><ol start="309" class="gmail-context-line" style="padding:0px 0px 0px 30px;margin:0px 10px;list-style-position:inside"><li style="padding:0px;margin:0px;font-family:monospace;white-space:pre;color:rgb(80,80,80);background-color:rgb(223,223,223)"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;display:inline"> query.delete_batch(pk_list, self.using)</pre> <span style="padding:0px;margin:0px">...</span></li></ol></div><div class="gmail-commands" style="padding:0px;margin:0px 0px 0px 40px"><a href="http://192.168.0.56/admin/layers/layer/#" style="padding:0px;margin:0px;color:rgb(85,85,85);text-decoration-line:none"><span style="padding:0px;margin:0px">▶</span> Local vars</a></div></li><li class="gmail-frame gmail-django" style="padding:0px 0px 1em;margin:0px;color:rgb(102,102,102)"><code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">/usr/local/lib/python2.7/dist-packages/django/db/models/sql/subqueries.py</code> in <code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">delete_batch</code><div class="gmail-context" id="gmail-c140028387884568" style="padding:10px 0px;margin:0px;overflow:hidden"><ol start="41" class="gmail-context-line" style="padding:0px 0px 0px 30px;margin:0px 10px;list-style-position:inside"><li style="padding:0px;margin:0px;font-family:monospace;white-space:pre;color:rgb(80,80,80);background-color:rgb(223,223,223)"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;display:inline"> self.do_query(self.get_meta().db_table, self.where, using=using)</pre> <span style="padding:0px;margin:0px">...</span></li></ol></div><div class="gmail-commands" style="padding:0px;margin:0px 0px 0px 40px"><a href="http://192.168.0.56/admin/layers/layer/#" style="padding:0px;margin:0px;color:rgb(85,85,85);text-decoration-line:none"><span style="padding:0px;margin:0px">▶</span> Local vars</a></div></li><li class="gmail-frame gmail-django" style="padding:0px 0px 1em;margin:0px;color:rgb(102,102,102)"><code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">/usr/local/lib/python2.7/dist-packages/django/db/models/sql/subqueries.py</code> in <code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">do_query</code><div class="gmail-context" id="gmail-c140028379903688" style="padding:10px 0px;margin:0px;overflow:hidden"><ol start="26" class="gmail-context-line" style="padding:0px 0px 0px 30px;margin:0px 10px;list-style-position:inside"><li style="padding:0px;margin:0px;font-family:monospace;white-space:pre;color:rgb(80,80,80);background-color:rgb(223,223,223)"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;display:inline"> self.get_compiler(using).execute_sql(NO_RESULTS)</pre> <span style="padding:0px;margin:0px">...</span></li></ol></div><div class="gmail-commands" style="padding:0px;margin:0px 0px 0px 40px"><a href="http://192.168.0.56/admin/layers/layer/#" style="padding:0px;margin:0px;color:rgb(85,85,85);text-decoration-line:none"><span style="padding:0px;margin:0px">▶</span> Local vars</a></div></li><li class="gmail-frame gmail-django" style="padding:0px 0px 1em;margin:0px;color:rgb(102,102,102)"><code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py</code> in <code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">execute_sql</code><div class="gmail-context" id="gmail-c140028379904840" style="padding:10px 0px;margin:0px;overflow:hidden"><ol start="840" class="gmail-context-line" style="padding:0px 0px 0px 30px;margin:0px 10px;list-style-position:inside"><li style="padding:0px;margin:0px;font-family:monospace;white-space:pre;color:rgb(80,80,80);background-color:rgb(223,223,223)"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;display:inline"> cursor.execute(sql, params)</pre> <span style="padding:0px;margin:0px">...</span></li></ol></div><div class="gmail-commands" style="padding:0px;margin:0px 0px 0px 40px"><a href="http://192.168.0.56/admin/layers/layer/#" style="padding:0px;margin:0px;color:rgb(85,85,85);text-decoration-line:none"><span style="padding:0px;margin:0px">▶</span> Local vars</a></div></li><li class="gmail-frame gmail-django" style="padding:0px 0px 1em;margin:0px;color:rgb(102,102,102)"><code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py</code> in <code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">execute</code><div class="gmail-context" id="gmail-c140028379905272" style="padding:10px 0px;margin:0px;overflow:hidden"><ol start="79" class="gmail-context-line" style="padding:0px 0px 0px 30px;margin:0px 10px;list-style-position:inside"><li style="padding:0px;margin:0px;font-family:monospace;white-space:pre;color:rgb(80,80,80);background-color:rgb(223,223,223)"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;display:inline"> return super(CursorDebugWrapper, self).execute(sql, params)</pre> <span style="padding:0px;margin:0px">...</span></li></ol></div><div class="gmail-commands" style="padding:0px;margin:0px 0px 0px 40px"><a href="http://192.168.0.56/admin/layers/layer/#" style="padding:0px;margin:0px;color:rgb(85,85,85);text-decoration-line:none"><span style="padding:0px;margin:0px">▶</span> Local vars</a></div></li><li class="gmail-frame gmail-django" style="padding:0px 0px 1em;margin:0px;color:rgb(102,102,102)"><code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py</code> in <code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">execute</code><div class="gmail-context" id="gmail-c140028379903616" style="padding:10px 0px;margin:0px;overflow:hidden"><ol start="59" class="gmail-context-line" style="padding:0px 0px 0px 30px;margin:0px 10px;list-style-position:inside"><li style="padding:0px;margin:0px;font-family:monospace;white-space:pre;color:rgb(80,80,80);background-color:rgb(223,223,223)"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;display:inline"> self.db.validate_no_broken_transaction()</pre> <span style="padding:0px;margin:0px">...</span></li></ol></div><div class="gmail-commands" style="padding:0px;margin:0px 0px 0px 40px"><a href="http://192.168.0.56/admin/layers/layer/#" style="padding:0px;margin:0px;color:rgb(85,85,85);text-decoration-line:none"><span style="padding:0px;margin:0px">▶</span> Local vars</a></div></li><li class="gmail-frame gmail-django" style="padding:0px 0px 1em;margin:0px;color:rgb(102,102,102)"><code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">/usr/local/lib/python2.7/dist-packages/django/db/backends/base/base.py</code> in <code style="padding:0px;margin:0px;font-size:10.5625px;white-space:pre-wrap">validate_no_broken_transaction</code><div class="gmail-context" id="gmail-c140028384027280" style="padding:10px 0px;margin:0px;overflow:hidden"><ol start="320" class="gmail-pre-context" id="gmail-pre140028384027280" style="padding:0px 0px 0px 30px;margin:0px 10px;list-style-position:inside"><li style="padding:0px;margin:0px;font-family:monospace;white-space:pre;color:rgb(119,119,119)"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;display:inline"> if self.in_atomic_block:</pre></li><li style="padding:0px;margin:0px;font-family:monospace;white-space:pre;color:rgb(119,119,119)"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;display:inline"> raise TransactionManagementError(</pre></li><li style="padding:0px;margin:0px;font-family:monospace;white-space:pre;color:rgb(119,119,119)"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;display:inline"> "This is forbidden when an 'atomic' block is active.")</pre></li><li style="padding:0px;margin:0px;font-family:monospace;white-space:pre;color:rgb(119,119,119)"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;display:inline"></pre></li><li style="padding:0px;margin:0px;font-family:monospace;white-space:pre;color:rgb(119,119,119)"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;display:inline"> def validate_no_broken_transaction(self):</pre></li><li style="padding:0px;margin:0px;font-family:monospace;white-space:pre;color:rgb(119,119,119)"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;display:inline"> if self.needs_rollback:</pre></li><li style="padding:0px;margin:0px;font-family:monospace;white-space:pre;color:rgb(119,119,119)"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;display:inline"> raise TransactionManagementError(</pre></li></ol><ol start="327" class="gmail-context-line" style="padding:0px 0px 0px 30px;margin:0px 10px;list-style-position:inside"><li style="padding:0px;margin:0px;font-family:monospace;white-space:pre;color:rgb(80,80,80);background-color:rgb(223,223,223)"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;display:inline"> "An error occurred in the current transaction. You can't "</pre> <span style="padding:0px;margin:0px">...</span></li></ol><ol start="328" class="gmail-post-context" id="gmail-post140028384027280" style="padding:0px 0px 0px 30px;margin:0px 10px;list-style-position:inside"><li style="padding:0px;margin:0px;font-family:monospace;white-space:pre;color:rgb(119,119,119)"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;display:inline"> "execute queries until the end of the 'atomic' block.")</pre></li><li style="padding:0px;margin:0px;font-family:monospace;white-space:pre;color:rgb(119,119,119)"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;display:inline"></pre></li><li style="padding:0px;margin:0px;font-family:monospace;white-space:pre;color:rgb(119,119,119)"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;display:inline"> # ##### Foreign key constraints checks handling #####</pre></li><li style="padding:0px;margin:0px;font-family:monospace;white-space:pre;color:rgb(119,119,119)"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;display:inline"></pre></li><li style="padding:0px;margin:0px;font-family:monospace;white-space:pre;color:rgb(119,119,119)"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;display:inline"> @contextmanager</pre></li><li style="padding:0px;margin:0px;font-family:monospace;white-space:pre;color:rgb(119,119,119)"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;display:inline"> def constraint_checks_disabled(self):</pre></li></ol></div><div class="gmail-commands" style="padding:0px;margin:0px 0px 0px 40px"><a href="http://192.168.0.56/admin/layers/layer/#" style="padding:0px;margin:0px;color:rgb(85,85,85);text-decoration-line:none"><span style="padding:0px;margin:0px">▼</span> Local vars</a></div><table class="gmail-vars" id="gmail-v140028384027280" style="padding:0px;margin:5px 0px 2px 40px;border:1px solid rgb(204,204,204);border-collapse:collapse;width:1649px;background:white;display:block"><thead style="padding:0px;margin:0px"><tr style="padding:0px;margin:0px"><th style="padding:1px 6px 1px 3px;margin:0px;background:rgb(254,254,254);text-align:left;font-weight:normal;font-size:11px;border:1px solid rgb(221,221,221)">Variable</th><th style="padding:1px 6px 1px 3px;margin:0px;background:rgb(254,254,254);text-align:left;font-weight:normal;font-size:11px;border:1px solid rgb(221,221,221)">Value</th></tr></thead><tbody style="padding:0px;margin:0px"><tr style="padding:0px;margin:0px"><td style="padding:2px 3px;vertical-align:top;font-family:monospace">self</td><td class="gmail-code" style="padding:2px 3px;vertical-align:top;font-family:monospace;width:1592px"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:12px;white-space:pre-wrap;overflow:hidden"><django.db.backends.postgresql_psycopg2.base.DatabaseWrapper object at 0x7f5b086ae0d0></pre></td></tr></tbody></table></li></ul></div></div></div></div>