cherrytea-dev/la_searcher_bot

Save new users' region_id (now we save forum folder id)

Offen

#16 geöffnet am 16.07.2023

 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (4 Forks)auto 404
enhancementgood first issue

Repository-Metriken

Stars
 (12 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

In every region there are several folders on the forum. in the beginning the 'regional" logic was based on id of each specific folder. But now we found out the the list of folders inside a region – is dynamic.

so we'd need to start saving not only region folder id, but also region_id to database – as user preference. I've created a dedicated table, which we'd need to update accordingly when user set / modified their list of regions.

Current "source of truth" about user's choice of regions – is the table user_regional_preferences. Goal of this Issue – is to start updating table user_pref_region for all regions in parallel to user_regional_preferences. (in future we'll deactivate user_regional_preferences) NB 1, we already updating this table ONLY for Moscow region in function manage_if_moscow – as a test it works. NB 2, in addition of adding regions into user_pref_region we need to develop a mechanism of deleting of records form there if user changes their region.

Contributor Guide