MCPcopy
hub / github.com/lektor/lektor / process_data

Method process_data

lektor/db.py:1547–1561  ·  view source on GitHub ↗
(self, data, datamodel, pad)

Source from the content-addressed store, hash-verified

1545 return record
1546
1547 def process_data(self, data, datamodel, pad):
1548 # Automatically fill in slugs
1549 if not data["_slug"]:
1550 data["_slug"] = default_slug_descriptor
1551 else:
1552 data["_slug"] = data["_slug"].strip("/")
1553
1554 # For attachments figure out the default attachment type if it's
1555 # not yet provided.
1556 if is_undefined(data["_attachment_type"]) and data["_attachment_for"]:
1557 data["_attachment_type"] = self.get_attachment_type(data["_path"])
1558
1559 # Automatically fill in templates
1560 if is_undefined(data["_template"]):
1561 data["_template"] = datamodel.get_default_template_name()
1562
1563 @staticmethod
1564 def get_record_class(datamodel, raw_data):

Callers 1

instance_from_dataMethod · 0.80

Calls 2

get_attachment_typeMethod · 0.95

Tested by

no test coverage detected