-
Notifications
You must be signed in to change notification settings - Fork 197
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
customer_id of NULL from a migration causes user preference error and no user listing anywhere #12
Comments
I did a clean install and had exactly the same problem with the first user, admin. Adding "1" to customer_id fixed a lot of things. |
OK, I'll see what I can do about this. |
One way to fix it. Assign a user to the customer in setup.rb.
|
Thanks very much for the patch. We'll certainly be doing that as well as adding a migration to fix existing data and adding mysql constraints to avoid breaking it again. |
Closing. |
set localization in a before filter
When migrating from repo.clockingit.com version to the github version, there is a problem with the users. In the user tables in the DB, customer_id is set to NULL after the migration. This causes the following problems:
I fixed this by manually updating the DB table users: "update users set customer_id=1;" which put all the users in to the first client, which I wanted anyway. In general though, putting it either into an unknown client or the default client will still be a headache to the admin anyway, since they will have to manually move users from one client to another.
A ActionView::TemplateError occurred in users#edit_preferences:
undefined method `name' for nil:NilClass
On line #45 of app/views/users/_form.html.erb
Request:
Session:
Environment:
Backtrace:
On line #45 of app/views/users/_form.html.erb
The text was updated successfully, but these errors were encountered: