django-cms / djangocms-moderation

Other
13 stars 21 forks source link

Returns a shorter UUID hexadecimal instead of a UUID instance #21

Closed damilare closed 6 years ago

damilare commented 6 years ago

This pull request contains a small fix for a major issue. The default reference number back-end uses uuid.uuid4() in returning a 35 char string from a UUID Instance on a models.CharField field with a max_length of 32, thereby causing a DataError exception when creating a new moderation request.

This fails on a Postgres database backend, so we have returned an hexadecimal value instead.