Initialize Lazy Strings before passing to json.dumps
Review Request #5038 — Created Nov. 28, 2013 and submitted — Latest diff uploaded
When trying to view the Repository Admin page, the master branch throws a "Object is not serializable" error because the value getting passed is a Promise (django.utils.functional.Promise) object rather than a decodable string. Create a LazyEncoder that will check for this type and call force_text on it so that it gets initialized properly.
Reference: https://docs.djangoproject.com/en/dev/topics/serialization/#id2
WebUI - Ensured that the repository admin page works fine.
Diff Revision 1
This is not the most recent revision of the diff. The latest diff is revision 2. See what's changed.
orig
1
2
djblets/util/templatetags/djblets_js.py |
---|