def save(_handler, litnacional_id, **litnacional_properties): cmd = facade.update_litnacional_cmd(litnacional_id, **litnacional_properties) try: cmd() except CommandExecutionException: context = {'errors': cmd.errors, 'litnacional': cmd.form} return TemplateResponse(context, 'litnacionals/admin/form.html') _handler.redirect(router.to_path(admin))
def update(litnacional_id, **litnacional_properties): cmd = facade.update_litnacional_cmd(litnacional_id, **litnacional_properties) return _save_or_update_json_response(cmd)