<?xml version="1.0"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>CKAN: Ticket Query</title>
    <link>http://localhost/query?status=!closed&amp;keywords=~vocabularies&amp;order=type</link>
    <description>The open source data portal software</description>
    <language>en-US</language>
    <image>
      <title>CKAN</title>
      <url>http://assets.okfn.org/p/ckan/img/ckan_logo_shortname.png</url>
      <link>http://localhost/query?status=!closed&amp;keywords=~vocabularies&amp;order=type</link>
    </image>
    <generator>Trac 0.12.3</generator>
    <item>
        <link>http://localhost/ticket/3014</link>
        <guid isPermaLink="false">http://localhost/ticket/3014</guid>
        <title>#3014: Crash when deleting a non-empty vocabulary</title>
        <pubDate>Tue, 13 Nov 2012 10:50:08 GMT</pubDate>
        
        <dc:creator>seanh</dc:creator>

        <description>&lt;p&gt;
From Knud Möller:
&lt;/p&gt;
&lt;p&gt;
when I try to delete a non-empty tag vocabulary via the API (through HTTP), I get an internal server error. Checking
the logs, this turns out to be a consistency error raised by  sqlalchemy:
&lt;/p&gt;
&lt;p&gt;
Error - &amp;lt;class 'sqlalchemy.exc.&lt;a class="missing wiki"&gt;IntegrityError?&lt;/a&gt;'&amp;gt;: (&lt;a class="missing wiki"&gt;IntegrityError?&lt;/a&gt;) update or delete on table "vocabulary" violates
foreign key constraint "tag_vocabulary_id_fkey" on table "tag"
DETAIL:  Key (id)=(21421955-7560-467c-af30-9f790b73e6ae) is still referenced from table "tag".
&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;
'DELETE FROM vocabulary WHERE vocabulary.id = %(id)s' {'id': u'21421955-7560-467c-af30-9f790b73e6ae'}
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
URL: &lt;a class="ext-link" href="http://33.33.33.10:5000/api/action/vocabulary_delete"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;http://33.33.33.10:5000/api/action/vocabulary_delete&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
The error makes sense, but I'm wondering if it would be useful to extend the API to also allow the deletion of
non-empty vocabularies, possibly via a parameter (not sure what best practice in API design is). At the very least, it
would be cool if the error message coming back in the response had more information in it.
&lt;/p&gt;
</description>
        <category>Results</category>
        <comments>http://localhost/ticket/3014#changelog</comments>
    </item>
 </channel>
</rss>