Skip to content

bovine_process.common

interaction_processor: Callable[[ProcessingItem, InteractionActor], Awaitable[ProcessingItem]] = ByActivityType(**interaction_handlers) module-attribute

Defines the processor that handles interactions with an object

sanitize(item, actor) async

Applies the default bovine context

Source code in bovine_process/bovine_process/common/__init__.py
async def sanitize(item: ProcessingItem, actor):
    """Applies the default bovine context"""
    item.data = with_bovine_context(item.data)

    if item.submitter != item.data.get("actor"):
        logger.error("Got wrong submitter for an activity %s", item.submitter)
        logger.error(item.data)
        # return

    return item