<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_dep(self, ):
 """Create a dep and store it in the self.dep :returns: None :rtype: None :raises: None """

        name = self.name_le.text()
        short = self.short_le.text()
        assetflag = self.asset_rb.isChecked()
        ordervalue = self.ordervalue_sb.value()
        desc = self.desc_pte.toPlainText()
        try:
            dep = djadapter.models.Department(name=name, short=short, assetflag=assetflag, ordervalue=ordervalue, description=desc)
            dep.save()
            for prj in self.projects:
                dep.projects.add(prj)
            self.dep = dep
            self.accept()
        except:
            log.exception("Could not create new department.")