-
-
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
Hook model can not support the object it defined primary key with CharField #127
Comments
Hi @xuziheng1002 , Why do you use a custom primary key? You can still have the column |
Thanks for your response, As above if I change this is version info in my project: |
The first impression that I have on that is that it shouldn't be a problem as long is it matches with the your primary key type. But it will be a manual step to install your app. |
I think it should be charfield in the library as well. I am looking into it. Maybe in the next version, you wouldn't need to modify it manually. |
There is another bug I discovered. All the tests I have done so far have been with models with integer primary keys. it turns out the core has some problems with the string primary keys. I am working on a fix that I will bundle it with the schema change and hopefully publish it as another version soon (3.1.1). I think you should wait for the next version @xuziheng1002 |
New version ( |
I defined a model like below:
the code_generator return string like TC-18442386587087147008
And when I try to approve the ticket to next stage:
but django returns ValueError: invalid literal for int() with base 10: 'TC-18442386587087147008'
I realized that that Hook model was be defind a IntegerField in source code :
In this case, I have to change it to:
So if you has other good solution, please let me know,thanks.
ziheng.xzh
The text was updated successfully, but these errors were encountered: