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