Creating workflow beyond first by api returns response code 500

When things doesn't work as they should.
Post Reply
Marcin
Posts: 3
Joined: Thu Jul 25, 2019 11:38 am

Creating workflow beyond first by api returns response code 500

Post by Marcin » Tue Aug 13, 2019 12:08 pm

Hello,
I am still trying to write vue.js based frontend for Mayan using REST API. This time I got stuck at creating workflows. I can create workflow if there is no existing one without problems but after that each time I send POST request to create another workflow it returns response "code 500 internal server error". How can I create more than one workflow using API?

User avatar
rosarior
Posts: 317
Joined: Tue Aug 21, 2018 3:28 am

Re: Creating workflow beyond first by api returns response code 500

Post by rosarior » Wed Aug 14, 2019 4:26 am

Thanks for the report. We'll try to replicate the error to find the source of the problem. In the meantime did any output show in the console that might shed some more light on the root of the problem? Thanks.

Marcin
Posts: 3
Joined: Thu Jul 25, 2019 11:38 am

Re: Creating workflow beyond first by api returns response code 500

Post by Marcin » Wed Aug 14, 2019 8:45 am

Ok, so I run docker-compose logs and the problem seems pretty clear: https://pastebin.com/RJJBiyS7

It seems that Rest API doesn't let us set "Internal name" that is supposed to be unique and is automatically set to empty string causing conflicts.

The funny thing is that actually worked when Mayan was using native Django SQLite. Problems started when I switched to PostgreSQL.

User avatar
rosarior
Posts: 317
Joined: Tue Aug 21, 2018 3:28 am

Re: Creating workflow beyond first by api returns response code 500

Post by rosarior » Thu Aug 15, 2019 7:27 am

Excellent! Thanks for the debug output!

Post Reply