-
-
Notifications
You must be signed in to change notification settings - Fork 105
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
Can not approve if input the params of <next_state> #132
Comments
I think that is a bug between Django-ORM and MySQL, Iterative the queryset then update/save the object one by one, instead of useing update function in queryset: # actual_cancelled_transitions.update(status=CANCELLED)
for i in actual_cancelled_transitions:
i.status = CANCELLED
i.save() |
Hey @xuziheng1002 , I will look into this and try to run the tests with MySQL @xuziheng1002 . |
this issue not only appears at approva(next_state) but also appears at |
This is a very weird behavior of MySQL it doesn't allow the tables that are also in the select query to be updated. Since those items are not too many, it is fine just to loop them in python and save them. I tested it with MySQL 8.0 but tests are still complaining about older versions (5.6 and 5.7). I will work more on that to see what it is that is not liked with the older versions. |
…er instead of checking in python and drop MySQL support lower than 8.0
Hey @xuziheng1002 , This PR should fix your problem out of the box. I will release this as soon as the tests are passed on the PR and you can use the next patch version which is Just so you know, It is not possible to support lower version of MySQL. It is only MySQL 8.0 which is supported. |
The new version is published. Closing this issue. |
This is my states:
init,doing,doing2,done
this is my transition meta approvals;
init->doing
init->doing2
doing->done
doing2->done
django.db raise following error when I try to approval to next state:
errors:
mysql:8.0
django:1.11
django-river:3.1.0
python:3.6.x
The text was updated successfully, but these errors were encountered: