Add character page and create/edit workflows #18

Merged
Jaculabilis merged 9 commits from tvb/character-page into develop 2021-08-29 15:15:45 +00:00
1 changed files with 4 additions and 0 deletions
Showing only changes of commit eec039c09a - Show all commits

View File

@ -49,6 +49,7 @@ def command_create(args):
@add_argument("--no-public", dest="public", action="store_const", const=False)
@add_argument("--join", dest="join", action="store_const", const=True)
@add_argument("--no-join", dest="join", action="store_const", const=False)
@add_argument("--char-limit", type=int, default=None)
def command_edit(args):
"""
Update a lexicon's configuration.
@ -66,6 +67,9 @@ def command_edit(args):
elif args.join == False:
values["joinable"] = False
if args.char_limit:
values["character_limit"] = args.char_limit
result = db(update(Lexicon).where(Lexicon.name == args.name).values(**values))
LOG.info(f"Updated {result.rowcount} lexicons")
db.session.commit()