Minor cleanup
This commit is contained in:
parent
214136485c
commit
48047a4b6a
@ -18,7 +18,7 @@ Games can only be created by the administrator. When a game is created, its name
|
||||
|
||||
The article writing workflow proceeds through the following states:
|
||||
|
||||
* Active: When player creates a draft, it is initialized with this state.
|
||||
* Active: When a player creates a draft, it is initialized with this state.
|
||||
Players can view and edit their active drafts. Admins can view all active
|
||||
drafts. Active drafts occupy an index slot in the lexicon, but the title is
|
||||
elided.
|
||||
|
@ -260,17 +260,17 @@ class ConfigFormBase(FlaskForm):
|
||||
lexicon.cfg.join.joined)))
|
||||
|
||||
def load(self, lexicon):
|
||||
for k, v in Settings.settings():
|
||||
field = getattr(self, k[2:], None)
|
||||
for name, setting in Settings.settings():
|
||||
field = getattr(self, name[2:], None)
|
||||
if field:
|
||||
v.load(lexicon.cfg, field)
|
||||
setting.load(lexicon.cfg, field)
|
||||
|
||||
def save(self, lexicon):
|
||||
with lexicon.ctx.edit_config() as cfg:
|
||||
for k, v in Settings.settings():
|
||||
field = getattr(self, k[2:], None)
|
||||
for name, setting in Settings.settings():
|
||||
field = getattr(self, name[2:], None)
|
||||
if field:
|
||||
v.save(cfg, field)
|
||||
setting.save(cfg, field)
|
||||
|
||||
|
||||
for k, v in Settings.settings():
|
||||
|
Loading…
Reference in New Issue
Block a user