mirror of
https://github.com/gorules/zen.git
synced 2026-10-04 08:02:28 +00:00
fix: rename templates crate (#140)
* fix: rename templates crate * fix: update workflow
This commit is contained in:
@@ -38,7 +38,7 @@ pub fn evaluate_unary_expression(expression: String, ctx: &PyDict) -> PyResult<b
|
||||
pub fn render_template(py: Python, template: String, ctx: &PyDict) -> PyResult<PyObject> {
|
||||
let context: Value = depythonize(ctx).context("Failed to convert context")?;
|
||||
|
||||
let result = zen_template::render(template.as_str(), &context)
|
||||
let result = zen_tmpl::render(template.as_str(), &context)
|
||||
.map_err(|e| anyhow!(serde_json::to_string(&e).unwrap_or_else(|_| e.to_string())))?;
|
||||
|
||||
Ok(PyValue(result).to_object(py))
|
||||
|
||||
@@ -73,7 +73,7 @@ impl PyNodeRequest {
|
||||
return Ok(PyValue(selected_value).to_object(py));
|
||||
};
|
||||
|
||||
let template_value = zen_template::render(template.as_str(), &self.inner_input)
|
||||
let template_value = zen_tmpl::render(template.as_str(), &self.inner_input)
|
||||
.map_err(|e| anyhow!(serde_json::to_string(&e).unwrap_or_else(|_| e.to_string())))?;
|
||||
|
||||
Ok(PyValue(template_value).to_object(py))
|
||||
|
||||
Reference in New Issue
Block a user