Quando aggiorno le categorie silenziate in un gruppo di utenti e rispondo sì a “aggiornare gli utenti esistenti?”, non sembra aggiornare. Ad esempio, vedi questo utente, #8, che è membro del gruppo #42, ma a cui mancano molte righe category_user:
RISULTATI SQL
- Conferma l’appartenenza dell’utente #8 al gruppo #42
SELECT gu.*, g.name
FROM group_users gu
JOIN groups g ON gu.group_id = g.id
WHERE user_id=8 and gu.group_id = 42;
id | group_id | user_id | created_at | updated_at | owner | notification_level | first_unread_pm_at | name
------+----------+---------+----------------------------+----------------------------+-------+--------------------+----------------------------+-------------------
4207 | 42 | 8 | 2023-07-03 11:36:43.828233 | 2023-07-03 11:36:43.828233 | f | 3 | 2023-12-29 22:52:43.371588 | japanese-learners
- Mostra i livelli di notifica attuali dell’utente #8
SELECT cu.*, c.name, c.parent_category_id
FROM category_users cu
JOIN categories c ON cu.category_id = c.id
WHERE cu.user_id = 8;
id | category_id | user_id | notification_level | last_seen_at | name | parent_category_id
-------+-------------+---------+--------------------+--------------+---------------+--------------------
42289 | 1 | 8 | 0 | | Uncategorized |
5981 | 5 | 8 | 1 | | Reading | 7
7981 | 6 | 8 | 1 | | Watching | 7
215 | 7 | 8 | 1 | | Japanese |
6981 | 9 | 8 | 1 | | Book Clubs | 5
214 | 10 | 8 | 0 | | Korean |
2386 | 11 | 8 | 0 | | Reading | 10
4384 | 12 | 8 | 0 | | Watching | 10
3385 | 13 | 8 | 0 | | Book Clubs | 11
36995 | 16 | 8 | 0 | | German |
- mostra i livelli di notifica del gruppo #42 (molti di più)
SELECT gcnd.*, c.name, c.parent_category_id
FROM group_category_notification_defaults gcnd
JOIN categories c ON gcnd.category_id = c.id
WHERE group_id=42;
id | group_id | category_id | notification_level | name | parent_category_id
-----+----------+-------------+--------------------+---------------+--------------------
1 | 42 | 10 | 0 | Korean |
8 | 42 | 7 | 1 | Japanese |
11 | 42 | 13 | 0 | Book Clubs | 11
12 | 42 | 11 | 0 | Reading | 10
14 | 42 | 12 | 0 | Watching | 10
26 | 42 | 9 | 1 | Book Clubs | 5
27 | 42 | 6 | 1 | Watching | 7
28 | 42 | 5 | 1 | Reading | 7
97 | 42 | 16 | 0 | German |
174 | 42 | 21 | 0 | Book Clubs | 18
177 | 42 | 18 | 0 | Reading | 16
178 | 42 | 22 | 0 | Reading | 17
179 | 42 | 23 | 0 | Watching | 17
180 | 42 | 17 | 0 | Spanish |
181 | 42 | 19 | 0 | Watching | 16
182 | 42 | 25 | 0 | Book Clubs | 22
367 | 42 | 1 | 0 | Uncategorized |
C’è un modo per eseguire manualmente questo processo ‘update_existing_users’ nella console rails? Sono molto inesperto riguardo a rails, quindi non sono riuscito a trovarlo nel codice. Penso che sarebbe probabilmente meglio provare a eseguirlo manualmente e vedere se il problema è nel processo di aggiornamento o se è nell’attivazione del processo di aggiornamento.
Fatemi sapere se qualcuno ha idee o aiuto!
Grazie
Informazioni aggiuntive:
Il mio sito: https://forums.learnnatively.com/
Versione Discourse: 3.2.0.beta4-dev (46eec95719)