From 5c4c0a3034152316d795f5f7af4099c47cc2b795 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 20 Sep 2020 12:06:10 -0700 Subject: [PATCH] Let jsonify.photo expect that tags are sets, not lists. --- etiquette/jsonify.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etiquette/jsonify.py b/etiquette/jsonify.py index 5105ae1..7b445ce 100644 --- a/etiquette/jsonify.py +++ b/etiquette/jsonify.py @@ -38,7 +38,7 @@ def exception(e): def photo(p, include_albums=True, include_tags=True): tags = p.get_tags() - tags.sort(key=lambda x: x.name) + tags = sorted(tags, key=lambda x: x.name) j = { 'type': 'photo', 'id': p.id,