Comment 3 for bug 1214627

Revision history for this message
Curtis Hovey (sinzui) wrote :

A quick hack to the staging template reveals that the insane bundle (the version is -1/ instead or /1/) is in the results. It doen't have a name, owner

<td tal:define="name hit['data'].permanent_url">
      <a href="${hit['data'].permanent_url}">${name}</a></td>
<td tal:content="hit['data']._raw_representation"></td>

jc:~/None/ {u'_id': u'~abentley/wiki-bundle-1/wiki', u'data': {u'services': {u'wiki': {u'charm': u'mediawiki', u'num_units': 2, u'branch': u'lp:charms/precise/mediawiki', u'constraints': u'mem=2'}, u'haproxy': {u'branch': u'lp:charms/precise/haproxy'}, u'db': {u'charm': u'mysql', u'options': {u'tuning-level': u'fast'}, u'branch': u'lp:charms/precise/mysql'}, u'memcached': {u'options': {u'request-limit': 32}, u'branch': u'lp:charms/precise/memcached'}}, u'series': u'precise', u'_id': u'~abentley/wiki-bundle-1/wiki', u'relations': [[u'wiki:db', u'db'], [u'wiki', [u'haproxy', u'memcached']]]}}

The short_url attr calls basket_name which splits the the basket key value from the _representation. The value is None since the raw didn't have a basket key.

There are a few issues here.
1. Bad bundle data in the db that we did not clean up.
2. Bundle.basket_name must not split None.