server/schema2sql.py
changeset 10671 e08102f45237
parent 10481 6ac4b1726e9f
child 11003 53820b08a723
--- a/server/schema2sql.py	Thu Oct 01 11:40:23 2015 +0200
+++ b/server/schema2sql.py	Tue Oct 13 16:57:09 2015 +0200
@@ -162,8 +162,8 @@
 
 def check_constraint(eschema, aschema, attr, constraint, dbhelper, prefix=''):
     # XXX should find a better name
-    cstrname = 'cstr' + md5(eschema.type + attr + constraint.type() +
-                            (constraint.serialize() or '')).hexdigest()
+    cstrname = 'cstr' + md5((eschema.type + attr + constraint.type() +
+                             (constraint.serialize() or '')).encode('ascii')).hexdigest()
     if constraint.type() == 'BoundaryConstraint':
         value = as_sql(constraint.boundary, dbhelper, prefix)
         return cstrname, '%s%s %s %s' % (prefix, attr, constraint.operator, value)