This function is used to migrate user preferences.
(self, pid, converter_func)
| 711 | return True, None |
| 712 | |
| 713 | def migrate_user_preferences(self, pid, converter_func): |
| 714 | """ |
| 715 | This function is used to migrate user preferences. |
| 716 | """ |
| 717 | user_prefs = UserPrefTable.query.filter_by( |
| 718 | pid=pid |
| 719 | ) |
| 720 | for pref in user_prefs: |
| 721 | pref.value = converter_func(pref.value) |
| 722 | |
| 723 | db.session.commit() |
| 724 | |
| 725 | @classmethod |
| 726 | def reset(cls): |
no outgoing calls
no test coverage detected