@classmethod
    def _field_set(cls, target, value, oldvalue, initiator):
        if value is None or isinstance(value, UploadedFile):
            return value

        set_property = inspect(target).mapper.get_property(initiator.key)
        column_type = set_property.columns[0].type
        assert(isinstance(column_type, UploadedFileField))

        upload_type = column_type._upload_type
        value = upload_type(value, column_type._upload_storage)
        value._apply_filters(column_type._filters)

        return value
dataset/ETHPy150Open amol-/depot/depot/fields/sqlalchemy.py/_SQLAMutationTracker._field_set/original