Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed inspect breakage when keys in redis were missing.

  • Loading branch information...
commit b9a5df305feab51e7ab5b887dc6c04f4cf1823bf 1 parent 16debd4
@ionelmc authored
View
2  src/redisboard/templates/redisboard/inspect.html
@@ -115,7 +115,7 @@
</tr>
<tr>
{% if key_details.error %}
- <td class="error" colspan="7">{% trans "ERROR:" %} {{ key_detail.error }}</td>
+ <td class="error" colspan="8">{% trans "ERROR:" %} {{ key_details.error }}</td>
{% else %}
<td>{{ key_details.type }}</td>
<td>{{ key_details.ttl }}</td>
View
3  src/redisboard/views.py
@@ -51,7 +51,7 @@ def _get_key_info(conn, key):
'length': "n/a",
'name': key,
'details': {},
- 'error': e,
+ 'error': str(e),
'ttl': "n/a",
}
@@ -61,6 +61,7 @@ def _get_key_info(conn, key):
'set': lambda conn, key, *args: list(enumerate(conn.smembers(key))),
'zset': lambda conn, key, start=0, end=-1: [(pos+start, val) for pos, val in enumerate(conn.zrange(key, start, end))],
'hash': lambda conn, key, *args: conn.hgetall(key).items(),
+ 'n/a': lambda conn, key, *args: (),
}
def _get_key_details(conn, db, key, page):
Please sign in to comment.
Something went wrong with that request. Please try again.