質問編集履歴
1
追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -48,7 +48,10 @@
|
|
48
48
|
def get_last_30_messages(ChatID):
|
49
49
|
print('ChatID::', ChatID)
|
50
50
|
chat = get_object_or_404(Chat, id=ChatID)
|
51
|
+
#この時点ではprint(chat) => 1 で pkがちゃんと返ってくる
|
51
52
|
return chat.messages.order_by('-timestamp').all()[:30]
|
53
|
+
#chat.messages.order_by('-timestamp').all()[:30] が空
|
54
|
+
|
52
55
|
```
|
53
56
|
|
54
57
|
adminで確認すると、確かにmessagesはある。
|