Skip to content

Commit

Permalink
Fixed TypeError problem
Browse files Browse the repository at this point in the history
  • Loading branch information
littlepea committed Mar 8, 2012
1 parent 3cd7464 commit 67721cf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dynamicsettings/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ def dynamicsettings_index(request):
for key in keys:
value = settings.get(key)
if isinstance(value, (list, tuple, dict)):
value = simplejson.dumps(value, indent=4)
try:
value = simplejson.dumps(value, indent=4)
except TypeError:
value = 'Not a serializable object'
res.append({
'key': key,
'value': value,
Expand Down

0 comments on commit 67721cf

Please sign in to comment.