def save(_handler, litinfantojuv_id=None, **litinfantojuv_properties): cmd = facade.save_litinfantojuv_cmd(**litinfantojuv_properties) try: cmd() except CommandExecutionException: context = {'errors': cmd.errors, 'litinfantojuv': cmd.form} return TemplateResponse(context, 'litinfantojuvs/admin/form.html') _handler.redirect(router.to_path(admin))
def save(**litinfantojuv_properties): cmd = facade.save_litinfantojuv_cmd(**litinfantojuv_properties) return _save_or_update_json_response(cmd)