Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Allow dump_object to be used with primary keys that are longs #13

merged 1 commit into from Sep 25, 2013


None yet
2 participants

danxshap commented Apr 9, 2012

I needed to use the dump_object command to generate fixtures for a model with primary keys that are longs (i.e. not ints or strings). For example dump_object myModel 437L. With the existing code, that would be converted to the string "437L", and that breaks when the query is executed.

I acknowledge that this solution won't work for string primary keys that look like python long literals (e.g. if you have a primary key that is a string equal to something like "437L"), but I feel like that would be an extremely rare case and that the use of longs in general as primary keys is a common enough scenario such that it warrants this change.

Let me know what you think.

@davedash davedash added a commit that referenced this pull request Sep 25, 2013

@davedash davedash Merge pull request #13 from danxshap/master
Allow dump_object to be used with primary keys that are longs

@davedash davedash merged commit 8ab7218 into davedash:master Sep 25, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment