Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profiles without chats are loaded as "Undefined's Chats" #327

Open
3 tasks
JnBrymn opened this issue Aug 16, 2020 · 1 comment
Open
3 tasks

Profiles without chats are loaded as "Undefined's Chats" #327

JnBrymn opened this issue Aug 16, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@JnBrymn
Copy link
Collaborator

JnBrymn commented Aug 16, 2020

image

The profiles is at https://www.pennyuniversity.org/profile//

List of users that have chats. These all load correctly.

>>> list(User.objects.filter(user_chats__isnull=False).distinct().values_list('id', flat=True))
[116, 87, 92, 482, 577, 73, 261, 103, 502, 121, 117, 88, 125, 113, 120, 15, 57, 61, 81, 104, 5, 91, 427, 54, 4, 96, 10, 105, 107, 86, 93, 89, 14, 66, 109, 13, 133, 2, 75, 128, 7, 78, 548, 1, 76, 106, 110, 129, 58, 8, 455, 71, 68, 52, 80, 132, 84, 101, 115, 114, 60, 97, 112, 108, 59, 65, 127, 124, 98, 567, 11, 82, 119, 279, 9, 79, 85, 95, 77, 131, 3, 17, 574, 74, 83, 67, 63, 90, 102, 460, 118, 111, 16, 123, 126, 99, 572, 53, 100, 12, 122, 94, 64, 55, 130]

List of users that don't have chats. These all load incorrectly.

>>> list(User.objects.filter(user_chats__isnull=True).distinct().values_list('id', flat=True))
[6, 50, 51, 56, 62, 69, 70, 72, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 456, 457, 458, 459, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 568, 569, 570, 571, 573, 575, 576]

TODO

  • Minimally, make their names load.
  • Better: make some encouraging/instructional phrase load like "No chats yet. Organize your first chat today! Get a conversation started in slack and then invite people with the /penny chat slack command."
  • Redirect when a user ID is entered that does not exist
@JnBrymn JnBrymn added the bug Something isn't working label Aug 16, 2020
@mrshwah
Copy link
Collaborator

mrshwah commented Aug 17, 2020

@JnBrymn If you want to work on your frontend chops at all, you could take this one. The reason it is happening is that we don't ever fetch the user, we just fetch their chats. If they don't have any chats, all that is returned is an empty list, so there is no information about the user. We should change the page to fetch the user (if they are not already in the store) so that we have their name. We may need this later to fetch interests as well!

Let me know if you want to pick this up and chat more about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants