def _validate_no_update_of_immutable_attributes(
        self,
        db_obj: ModelType,
        obj_in: UpdateSchemaType | dict,
        extra_immutable_fields: Optional[list[str]] = None,
    ) -> None:
        """Validate that no immutable attributes are being modified.

        Only checks for fields that are already present in the database object.

        Args:
        ----
            db_obj (ModelType): The existing object in the database.
            obj_in (Union[UpdateSchemaType, Dict[str, Any]]): The new data intended for update.
            extra_immutable_fields (Optional[List[str]]): Additional fields that should be treated
                as immutable.

        Raises:
        ------
            ImmutableFieldError: If an immutable field is being modified.

        """
        immutable_fields = ["created_at", "created_by_email"]

        if not isinstance(obj_in, dict):
            obj_in = obj_in.model_dump()

        if extra_immutable_fields:
            immutable_fields.extend(extra_immutable_fields)

        for key in immutable_fields:
            original_value = getattr(db_obj, key, None)
            new_value = obj_in.get(key)

            if original_value is None:
                continue

            if new_value is not None and new_value != original_value:
                raise ImmutableFieldError(key)
Validate that no immutable attributes are being modified.

        Only checks for fields that are already present in the database object.

        Args:
        ----
            db_obj (ModelType): The existing object in the database.
            obj_in (Union[UpdateSchemaType, Dict[str, Any]]): The new data intended for update.
            extra_immutable_fields (Optional[List[str]]): Additional fields that should be treated
                as immutable.

        Raises:
        ------
            ImmutableFieldError: If an immutable field is being modified.

        
backend/airweave/crud/_base.py