Remus Avram Posted July 20, 2016 Report Posted July 20, 2016 Hi all, I try to delete a type which is not added to any workflow schema. Unfortunately I get the error message: "A server error occurred. Please try again or contact support." I checked the ftrack.log and I get this: ./ftrack.log: File "/opt/ftrack/environments/ftrack/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 117, in delete_obj ./ftrack.log: cached_connections, mapper, table, delete) ./ftrack.log: File "/opt/ftrack/environments/ftrack/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 694, in _emit_delete_statements ./ftrack.log:IntegrityError: (IntegrityError) (1451, 'Cannot delete or update a parent row: a foreign key constraint fails (`ftrack`.`project_scheme_override`, CONSTRAINT `project_scheme_override_ibfk_1` FOREIGN KEY (`typeid`) REFERENCES `task_type` (`typeid`))') 'DELETE FROM task_type WHERE task_type.typeid = %s' ('15c977fc-b93e-11e5-88e0-005056a76761',) I queried the database and in project_scheme_override table there are still entries with typeid '15c977fc-b93e-11e5-88e0-005056a76761'. How can I delete the type correctly? Best, Remus
Mattias Lagergren Posted July 21, 2016 Report Posted July 21, 2016 Hi Remus, I would strongly recommend going through the user interface to delete task types as there is some custom logic and validations. In this case it looks like the type is still used in a schema.
Remus Avram Posted July 21, 2016 Author Report Posted July 21, 2016 Hi Mattias, thanks for the answer! I am getting the error when I am trying to delete the task type through the user interface.
Mattias Lagergren Posted July 21, 2016 Report Posted July 21, 2016 3 minutes ago, Remus Avram said: Hi Mattias, thanks for the answer! I am getting the error when I am trying to delete the task type through the user interface. Oh, sorry - I read it too quick then! It looks like one or more schemas have them in their overrides. If you go to System settings > Workflow > Schemas and check each "Task" schema for overrides where the specific Type may be.
Remus Avram Posted July 21, 2016 Author Report Posted July 21, 2016 Unfortunately, we don't have anymore any 'Override (task types)' in any Schema. Could be possible that I changed the task type for some tasks using the API and it didn't update all the dependencies.
Mattias Lagergren Posted July 22, 2016 Report Posted July 22, 2016 21 hours ago, Remus Avram said: Could be possible that I changed the task type for some tasks using the API and it didn't update all the dependencies. The foreign key contraint (project_scheme_override) suggests that it is a schema override. I would suggest open a support ticket, (support@ftrack.com) and reference our conversation here.
Remus Avram Posted July 22, 2016 Author Report Posted July 22, 2016 Thanks for your answer! I opened a new support ticket regarding this issue.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.