Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix for MySQL cast expression

  • Loading branch information...
commit e6fcddc0a32e5700ee23749691e74ece1a19a0d8 1 parent d8b3d38
Charles Leifer authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  generic_aggregation/utils.py
View
2  generic_aggregation/utils.py
@@ -195,6 +195,8 @@ def gfk_expression(qs_model, gfk_field):
pk_field_type = get_field_type(qs_model._meta.pk)
gfk_field_type = get_field_type(gfk_field.model._meta.get_field(gfk_field.fk_field))
+ if 'mysql' in connection.settings_dict['ENGINE'] and pk_field_type == 'integer':
+ pk_field_type = 'unsigned'
if pk_field_type != gfk_field_type:
# cast the gfk to the pk type
Please sign in to comment.
Something went wrong with that request. Please try again.