<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def open_submission(self, url=None):
 """ Select the current submission to view posts. """

        if url is None:
            data = self.get_selected_item()
            url = data['permalink']
            if data.get('url_type') == 'selfpost':
                self.config.history.add(data['url_full'])

        self.selected_page = self.open_submission_page(url)