mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-02 03:30:54 +00:00
Bypass cache when displaying settings on "settings" page (#4499)
* Bypass cache when displaying settings on "settings" page
- Sometimes caching issues can cause "old" values to be stored (depends on the worker)
- Until we have a shared cache, this is a problem
- Force the settings to be re-loaded from the database when displaying
- Further improvement would be to render them via the API
* Bypass cache for report and label printing
* Update test
(cherry picked from commit 18c7c1d756
)
This commit is contained in:
@ -375,7 +375,7 @@ class BuildReportTest(ReportTest):
|
||||
self.assertEqual(headers['Content-Disposition'], 'attachment; filename="report.pdf"')
|
||||
|
||||
# Now, set the download type to be "inline"
|
||||
inline = InvenTreeUserSetting.get_setting_object('REPORT_INLINE', user=self.user)
|
||||
inline = InvenTreeUserSetting.get_setting_object('REPORT_INLINE', cache=False, user=self.user)
|
||||
inline.value = True
|
||||
inline.save()
|
||||
|
||||
|
Reference in New Issue
Block a user