'method to create object before post
:param data:
:param view_kwargs:
:return:'

def before_create_object(self, data, view_kwargs):

    if view_kwargs.get('event_sub_topic_id'):
        event_sub_topic = safe_query(self, EventSubTopic, 'id', view_kwargs['event_sub_topic_id'], 'event_sub_topic_id')
        data['event_sub_topic_id'] = event_sub_topic.id
