Moving project namespace when creator user has been deleted
Created by: Zhann
I tried moving a project from one namespace to the other, but it it kept on loading without any results. It did not do anything, it didn't even show any errors.
When I looked in the logs, I saw the following:
ActiveRecord::RecordInvalid (Validation failed: Creator can't be blank):
When I looked into it, the project had creator_id 14, but when trying to search for User with id 14 I got:
ActiveRecord::RecordNotFound: Couldn't find User with id=14
This user has probably been deleted at some point..
I manually updated the project's creator_id via the console, and from then on I could change the namespace.
Maybe moving a project shouldn't validate if the creator still exists. Or better yet, maybe deleting a user should change creator_id on all of that user's projects.