Update namespace if user changed username. Dont move project if new record
This commit is contained in:
parent
5ca1772385
commit
96105e214f
2 changed files with 7 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
class ProjectObserver < ActiveRecord::Observer
|
||||
def before_save(project)
|
||||
# Move repository if namespace changed
|
||||
if project.namespace_id_changed?
|
||||
if project.namespace_id_changed? and not project.new_record?
|
||||
move_project(project)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue