Add an event

def add_event(self, name, subfolder, session):
        """
        Add an event
        """
        if self._similar_event_exists(subfolder):
            subfolder += "_{0}".format(self.next_id(subfolder))
        new_event = ProjectFileEvent(name=name, subfolder=subfolder)
        session.add(new_event)
        self.events.append(new_event)
        session.commit()
        return new_event