diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 80b2046ba..1ca63cc98 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -780,7 +780,7 @@ class ProjectsController < ApplicationController project_status = ProjectStatus.find_by_project_id(@project.id) project_status.destroy elsif params[:project][:is_public] == '1' - project_status = ProjectStatus.create(:project_id => @project.id, :watchers_count => 0, :changesets_count => 0) + project_status = ProjectStatus.create(:project_id => @project.id, :watchers_count => 0, :changesets_count => 0, :project_type => 1) end respond_to do |format| diff --git a/app/models/user.rb b/app/models/user.rb index 981ff5af5..45c7ae645 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -84,12 +84,9 @@ class User < Principal has_many :new_jours, :as => :jour, :class_name => 'JournalsForMessage', :conditions => "status=1" has_many :journal_replies, :dependent => :destroy has_many :activities, :dependent => :destroy - has_many :students_for_courses, :dependent => :destroy + has_many :students_for_courses has_many :courses, :through => :students_for_courses, :source => :project has_many :acts, :class_name => 'Activity', :as => :act, :dependent => :destroy - has_many :acts, :class_name => 'Activity', :as => :act, :dependent => :destroy - has_many :acts, :class_name => 'Activity', :as => :act, :dependent => :destroy - has_many :acts, :class_name => 'Activity', :as => :act, :dependent => :destroy ##### ######added by nie