def _set_object_or_id(self, field, object_):
        id_field = '%s_id' % field
        if isinstance(object_, six.integer_types):
            setattr(self, id_field, object_)
        elif object_ is None:
            setattr(self, field, None)
            setattr(self, id_field, None)
        else:
            setattr(self, field, object_)
            setattr(self, id_field, object_.id)
Either write the integer to
dataset/ETHPy150Open tschellenbach/Stream-Framework/stream_framework/activity.py/Activity._set_object_or_id