views:

25

answers:

0

I'm querying a table from my Django app, but whenever I do a query on one specific table, I am getting the UUID column returned as a bytes_le style UUID instead of a workable string representation. Now, I know I convert it using uuid.UUID(bytes_le=value), but I'm using this query to populate a WTForms QuerySelectField, so I don't really have the luxury of getting to manually fix the UUID unless I want to call the query, get the results, and then copy them into another list (with the UUID's fixed) and then pass that list to my QuerySelectField.query object. Is there a better way I can force SqlAlchemy to stop giving me a useless format?

Also, it's only happening on this one table. When I query any other table with UUID's, they work fine, and my MSSQLServer tables all have 'uniqueidentifier' row types specified and I am using the same data structure for the uuid columns in all my sqlalchemy models.