-
Notifications
You must be signed in to change notification settings - Fork 11
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
Archive data in db:seed needed #70
Comments
After fighting with seed.rb for a while, I realized that there is a time validator in Event model which prevents events being created in past. Lines 263 to 268 in 3f752de
Only way I think past this is to add a flag in the model like @abhisek suggestions? |
You can use model#update_column or disable validation before saving.
…On Fri, Apr 2, 2021, 8:25 PM Sunil Kumar ***@***.***> wrote:
After fighting with seed.rb for a while, I realized that there is a time
validator in Event model which prevents events being created in past.
https://github.com/null-open-security-community/swachalit/blob/3f752de47912efaf17cc295d241e0733f65d7b74/app/models/event.rb#L263-L268
Only way I think past this is to add a flag in the model like past_event:
false, but don't know how to limit that in dev environment only.
@abhisek <https://github.com/abhisek> suggestions?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#70 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAHYZB3ZUTUTLNMEMIC42TTGXLFXANCNFSM4XFUI3CA>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We need to have some past events in dummy db so that past event related bug could be visualized.
Right now both dev and admin interface wont let me move dates back.
The text was updated successfully, but these errors were encountered: