fix: app get replay storage

pull/1043/head
liuzheng712 7 years ago
parent ea27d05c58
commit fc61dea9b5
No known key found for this signature in database
GPG Key ID: 76B55D91E7BB2978

@ -45,7 +45,12 @@ class Terminal(models.Model):
return {"TERMINAL_COMMAND_STORAGE": storage} return {"TERMINAL_COMMAND_STORAGE": storage}
def get_replay_storage(self): def get_replay_storage(self):
pass storage_all = settings.TERMINAL_REPLAY_STORAGE
if self.replay_storage in storage_all:
storage = storage_all.get(self.replay_storage)
else:
storage = storage_all.get('default')
return {"TERMINAL_REPLAY_STORAGE": storage}
@property @property
def config(self): def config(self):
@ -54,6 +59,7 @@ class Terminal(models.Model):
if k.startswith('TERMINAL'): if k.startswith('TERMINAL'):
configs[k] = getattr(settings, k) configs[k] = getattr(settings, k)
configs.update(self.get_common_storage()) configs.update(self.get_common_storage())
configs.update(self.get_replay_storage())
return configs return configs
def create_app_user(self): def create_app_user(self):

Loading…
Cancel
Save