Unable to edit user

Problem:
Click on edit user, receive an error.
Oops, we’re sorry but something went wrong The single-table inheritance mechanism failed to locate the subclass: ‘PuppetError’. This error is raised because the column ‘type’ is reserved for storing the class in case of inheritance. Please rename this column if you didn’t intend it to be used for storing the inheritance class or overwrite MailNotification.inheritance_column to use another column for that information.

Thank you
Expected outcome:
Edit user
Foreman and Proxy versions:
Foreman: 1.19.1
Proxy:
Foreman and Proxy plugin versions:
foreman-tasks 0.13.4
foreman_ansible 2.2.9
foreman_memcache 0.1.1
foreman_remote_execution 1.5.6
foreman_xen 0.6.1
Other relevant data:
[e.g. logs from Foreman and/or the Proxy, modified templates, commands issued, etc]
(for logs, surround with three back-ticks to get proper formatting, e.g.)

logs

Hi,
this could be related to #16159, where the type of notification changed, which landed in 1.16. It looks like you still have the old type for some reason. Try listing mail notifications using API to see what results you get:

curl -H "Accept: application/json" -H "Content-Type: application/json" -k -X GET -u admin:changeme https://$(hostname)/api/v2/mail_notifications| json_reformat

I expect you might have ‘puppet_error_state’ notification instead of ‘config_error_state’. You can view all migrations by running foreman-rake db:migrate:status - there should be ‘Rename puppet mail notifications’ with the 20160818062936 migration id. You can use foreman-rake db:migrate to re-run the migrations if some of them have ‘down’ status.

Thank you @Ondrej_Prazak, i ran the curl command on all 3 of our foreman servers.
The return was
{
“error”: {
“message”: “The single-table inheritance mechanism failed to locate the subclass: ‘PuppetError’. This error is raised because the column ‘type’ is reserved for storing the class in case of inheritance. Please rename this column if you didn’t intend it to be used for storing the inheritance class or overwrite MailNotification.inheritance_column to use another column for that information.”
}
}

I ran foreman-rake db:migrate:status it returned
up 20160818062936 Rename puppet mail notifications on all 3 with none showing down.

Thank you for any help it is appreciated.

Could you try to run the migration down and up again to see if that helps? It worked for me when I manually corrupted my notifications.

foreman-rake db:migrate:down VERSION=20160818062936
foreman-rake db:migrate:up VERSION=20160818062936