Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix fake_data failed at User.is_new? validator #824

Merged
merged 1 commit into from
Mar 3, 2020

Conversation

favadi
Copy link
Contributor

@favadi favadi commented Feb 17, 2020

fake_data failed to run with following errors:

$ rails fake_data
rails aborted!
ActiveRecord::RecordInvalid: Validation failed: Url is an unseen domain from a new user
/home/favadi/code/personal/lobsters/lib/tasks/fake_data.rake:30:in `block in generate'
/home/favadi/code/personal/lobsters/lib/tasks/fake_data.rake:25:in `times'
/home/favadi/code/personal/lobsters/lib/tasks/fake_data.rake:25:in `generate'
/home/favadi/code/personal/lobsters/lib/tasks/fake_data.rake:100:in `block in <top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Tasks: TOP => fake_data
(See full trace by running task with --trace)

Fixed by changing fake user created_at to NEW_USER_DAYS.days.ago.

@pushcx
Copy link
Member

pushcx commented Mar 3, 2020

Ah, thanks for catching this and submitting a fix. Sorry I broke it for you.

@pushcx pushcx merged commit cc35439 into lobsters:master Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants