seven-technologies-cloud / pythonrest

Creative Commons Zero v1.0 Universal
10 stars 4 forks source link

SQLServer Database-Generated API returns CHAR(36) with blank spaces #10

Closed leo-viana closed 2 months ago

leo-viana commented 9 months ago

Goal

Track down what is causing the blank spaces on responses with id and fix them.

Description

When building any response that contains a table column of type CHAR(36) of a sqlserver database, the code seems to be retrieving the length of the type of the table column instead of the length of the value itself, rendering responses like the below: image

Steps to Reproduce

leo-viana commented 2 months ago

Closing this because the database is probably filling the missing characters with empty spaces to enforce the CHAR(36) data type.