On 10/14/10 - 03:59:15PM, [email protected] wrote: > From: Jan Provaznik <[email protected]> > > create_*_user tasks pass quota info as quota is required when creating new > user > --- > src/lib/tasks/dc_tasks.rake | 5 ++++- > 1 files changed, 4 insertions(+), 1 deletions(-) > > diff --git a/src/lib/tasks/dc_tasks.rake b/src/lib/tasks/dc_tasks.rake > index 4b9d4e4..880ee17 100644 > --- a/src/lib/tasks/dc_tasks.rake > +++ b/src/lib/tasks/dc_tasks.rake > @@ -16,7 +16,9 @@ namespace :dc do > user = User.new(:login => args.login, :email => args.email, > :password => args.password, > :password_confirmation => args.password, > - :first_name => args.first_name, :last_name => > args.last_name) > + :first_name => args.first_name, > + :last_name => args.last_name, > + :quota => Quota.new) > registration = RegistrationService.new(user) > if registration.save > puts "User registered" > @@ -78,6 +80,7 @@ namespace :dc do > u.password, u.password_confirmation = 'password', 'password' > u.email = '[email protected]' > u.first_name = 'Administrator' > + u.quota = Quota.new > if u.save > puts "Created user 'admin' with password 'password'" > end
I took a look at this earlier. It seems to me that the best way to fix this would be to make :create_admin_user re-use the code from :create_user and :site_admin, rather than hard-coding its own way of doing it. I just couldn't figure out how to do it at the time :) -- Chris Lalancette _______________________________________________ deltacloud-devel mailing list [email protected] https://fedorahosted.org/mailman/listinfo/deltacloud-devel
