<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_asset(self, ):
 """Create a asset and store it in the self.asset :returns: None :rtype: None :raises: None """

        name = self.name_le.text()
        if not name:
            self.name_le.setPlaceholderText("Please enter a name!")
            return
        desc = self.desc_pte.toPlainText()
        if not self.atype:
            atypei = self.atype_cb.currentIndex()
            assert atypei >= 0
            self.atype = self.atypes[atypei]
        try:
            asset = djadapter.models.Asset(atype=self.atype, project=self.project, name=name, description=desc)
            asset.save()
            self.asset = asset
            self.accept()
        except:
            log.exception("Could not create new asset")