forked from CGM_Public/pretix_original
Revert GlobalSettingsObject singleton as it broke tests
This commit is contained in:
@@ -515,14 +515,8 @@ class SettingsSandbox:
|
|||||||
|
|
||||||
|
|
||||||
class GlobalSettingsObject():
|
class GlobalSettingsObject():
|
||||||
data_dict = None
|
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
# This is a singleton-like object. Multiple objects can exist, but they share their state
|
self.settings = SettingsProxy(self, type=GlobalSetting)
|
||||||
if GlobalSettingsObject.data_dict:
|
self.setting_objects = GlobalSetting.objects
|
||||||
self.__dict__ = GlobalSettingsObject.data_dict
|
self.slug = '_global'
|
||||||
else:
|
|
||||||
self.settings = SettingsProxy(self, type=GlobalSetting)
|
|
||||||
self.setting_objects = GlobalSetting.objects
|
|
||||||
self.slug = '_global'
|
|
||||||
GlobalSettingsObject.data_dict = self.__dict__
|
|
||||||
|
|||||||
Reference in New Issue
Block a user