Debugging a lookup error
It was saying stuff was unhashable, but I thought I was just hashing by post ID.
This commit is contained in:
parent
4e948788d7
commit
4faba56cfe
|
@ -1,5 +1,10 @@
|
|||
def maketree(descendants):
|
||||
lookup = {(descendant.id, descendant) for descendant in descendants}
|
||||
try:
|
||||
lookup = {(descendant.id, descendant) for descendant in descendants}
|
||||
except:
|
||||
from pprint import pprint
|
||||
pprint(lookup)
|
||||
raise
|
||||
replies = {}
|
||||
roots = set()
|
||||
for descendant in descendants:
|
||||
|
|
|
@ -671,7 +671,7 @@ def note(request, next=None, prev=None):
|
|||
},
|
||||
)
|
||||
|
||||
import threadtree
|
||||
from . import threadtree
|
||||
|
||||
@br_login_required
|
||||
def thread(request, id):
|
||||
|
@ -700,7 +700,7 @@ def thread(request, id):
|
|||
"context": context,
|
||||
"toot": toot,
|
||||
"root": root,
|
||||
"posts": threadtree.build(descendants)),
|
||||
"posts": threadtree.build(descendants),
|
||||
"own_acct": request.session["active_user"],
|
||||
"notifications": notifications,
|
||||
"preferences": account.preferences,
|
||||
|
|
Loading…
Reference in New Issue