def fetch_activities_objects(appstruct): """ Fetch company activities in order to be able to associate them to the company """ activities = appstruct.pop("activities", None) if activities: return [CompanyActivity.get(activity_id) for activity_id in activities] return []
def fetch_activities_objects(appstruct): """ Fetch company activities in order to be able to associate them to the company """ activities = appstruct.pop('activities', None) if activities: return [CompanyActivity.get(activity_id) for activity_id in activities] return []