Exemplo n.º 1
0
    def modify_project(self, project_id, manager_uid=None, description=None):
        """Modify an existing project"""
        if not manager_uid and not description:
            return
        values = {}
        if manager_uid:
            manager = db.user_get(context.get_admin_context(), manager_uid)
            values['project_manager'] = manager['id']
        if description:
            values['description'] = description

        db.project_update(context.get_admin_context(), project_id, values)
        if not self.is_in_project(manager_uid, project_id):
            self.add_to_project(manager_uid, project_id)
Exemplo n.º 2
0
    def modify_project(self, project_id, manager_uid=None, description=None):
        """Modify an existing project"""
        if not manager_uid and not description:
            return
        values = {}
        if manager_uid:
            manager = db.user_get(context.get_admin_context(), manager_uid)
            if not manager:
                raise exception.NotFound(_("Project can't be modified because "
                                           "manager %s doesn't exist") %
                                          manager_uid)
            values['project_manager'] = manager['id']
        if description:
            values['description'] = description

        db.project_update(context.get_admin_context(), project_id, values)
Exemplo n.º 3
0
    def modify_project(self, project_id, manager_uid=None, description=None):
        """Modify an existing project"""
        if not manager_uid and not description:
            return
        values = {}
        if manager_uid:
            manager = db.user_get(context.get_admin_context(), manager_uid)
            if not manager:
                raise exception.NotFound(
                    _("Project can't be modified because "
                      "manager %s doesn't exist") % manager_uid)
            values['project_manager'] = manager['id']
        if description:
            values['description'] = description

        db.project_update(context.get_admin_context(), project_id, values)
        if not self.is_in_project(manager_uid, project_id):
            self.add_to_project(manager_uid, project_id)